Bug 226905 - Cannot rename NetBeans App without dire consequences
Cannot rename NetBeans App without dire consequences
Status: RESOLVED WORKSFORME
Product: platform
Classification: Unclassified
Component: Filesystems
7.3
Macintosh (x86) Mac OS X
: P3 (vote)
: TBD
Assigned To: Jaroslav Havlin
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-01 16:55 UTC by inanutshell
Modified: 2013-09-27 10:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


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

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.:

    java.io.FileNotFoundException: Cannot find 'jar:file:/Applications/NetBeans/NetBeans%207.3.app/Contents/Resources/NetBeans/ide/modules/org-netbeans-modules-defaults.jar!/org/netbeans/modules/defaults/CityLights-EL-fontsColors.xml'

The simple reason is that I renamed the app! It's not in the "NetBeans/NetBeans 7.3.app" 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/NetBeans%207.3.app
2, Rename folder /Applications/NetBeans/NetBeans%207.3.app to something else for example /Applications/NetBeans/MyNetBeans%207.3.app 
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/Caches/NetBeans/7.4rc1
/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:
http://wiki.netbeans.org/FaqAlternateUserdir
http://wiki.netbeans.org/FaqNetbeansConf

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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo