This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226905 - Cannot rename NetBeans App without dire consequences
Summary: Cannot rename NetBeans App without dire consequences
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.3
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Jaroslav Havlin
Depends on:
Reported: 2013-03-01 16:55 UTC by inanutshell
Modified: 2014-08-22 09:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

messages.log containing the FileNotFoundExceptions (752.23 KB, application/octet-stream)
2013-03-01 16:55 UTC, inanutshell

Note You need to log in before you can comment on or make changes to this bug.
Description inanutshell 2013-03-01 16:55:28 UTC
Created attachment 132077 [details]
messages.log containing the FileNotFoundExceptions

When upgrading NB from 7.2 to 7.3 I received two errors on startup:

* Cannot load window system persistent data, user directory content is broken. Resetting to default layout... 
* Cannot load even default layout, using internally predefined configuration 

I dug into the messages.log file and found several FileNotFoundExceptions, e.g.: Cannot find 'jar:file:/Applications/NetBeans/!/org/netbeans/modules/defaults/CityLights-EL-fontsColors.xml'

The simple reason is that I renamed the app! It's not in the "NetBeans/NetBeans" folder anymore. It appears the path to NB is hardcoded somewhere.
Comment 1 inanutshell 2013-03-01 17:11:29 UTC
Beyond the initial error dialogs, the actual side-effects are that sidebars don't work (you can't collapse windows such as Files, Projects, etc), syntax hilighting doesn't work, you can't ctrl/cmd-click on members, text hilighting (e.g. selecting text) doesn't work, etc. Essentially all editor features are gone beyond displaying text.

NetBeans is reduced to being Notepad.
Comment 2 Milutin Kristofic 2013-03-04 15:05:37 UTC
I would like to help with issue, but I need more exact steps. I suppose that you mean by upgrade that you download new version 7.3 from website. Therefore your steps were

1, Install 7.3 to /Applications/NetBeans/
2, Rename folder /Applications/NetBeans/ to something else for example /Applications/NetBeans/ 
3, Run Netbeans 7.3 first time with empty userdir?

Am I correct?
Comment 3 Milutin Kristofic 2013-03-04 15:22:58 UTC
Ok, I reproduce this succesfully with previously described steps
Comment 4 Milutin Kristofic 2013-03-04 16:05:14 UTC
Editor.Settings are working only with FileObjects, there is no sign with caching path. Sending to FileSystems.
Comment 5 Jaroslav Havlin 2013-09-27 10:20:34 UTC
I can reproduce the problem, too.

The old paths are cached, so you need to clear the cachedir (and probably also userdir).

In my case, I removed these directories (and it helped):
/Users/jhavlin/Library/Application Support/NetBeans/7.4rc1

If you need to use several instances of the same version (with different names), each of them may need its own cachedir and userdir. See:

I think this case is quite rare, so handling this on NetBeans side is not needed.
Closing the issue as WORKSFORME. If clearing of the cachedir doesn't help you, please reopen the issue.

Thanks for reporting.
Comment 6 ffx 2014-08-21 17:25:45 UTC
No you cannot move or rename the Netbeans 8 app in OSX. It has to stay in /Applications/netbeans/ . This was introduced with version 7.3.

It would be helpful if we can move the application to any dir we like. E.g. I organize my apps with subdirs like "code", "graphics", "audio" etc.

Thanks for fixing ...
Comment 7 Jaroslav Havlin 2014-08-22 09:52:12 UTC
(In reply to ffx from comment #6)
> No you cannot move or rename the Netbeans 8 app in OSX. It has to stay in
> /Applications/netbeans/ . This was introduced with version 7.3.
It should be possible if you edit the configuration file (netbeans.conf) so that correct userdir and cachedir is used.
Did you try it? (I'm sorry, I cannot check it right now.)