NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
I've recently installed the JDK 8 on my rMBP and all of a sudden NetBeans stopped working for me. I've dug into this a little further and tried several things, none of which worked, in the end I ended up forcing NetBeans to use JDK 7 and everything was working again.
First NetBeans stopped launching from my Dock, so I opened up Terminal and tried to launch it manually, this presented me with the following error:
> open /Applications/NetBeans/NetBeans 7.1.2.app
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/NetBeans/NetBeans 7.1.2.app.
Not much information here, so I tried to launch the NetBeans binary instead:
> /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/bin/netbeans
Unrecognized VM option 'MaxPermSize=384m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Now I was getting somewhere.
The /Applications/NetBeans/NetBeans 7.1.2.app/Contents/MacOS/netbeans
script has the following setting:
I tried removing the MaxPermSize
setting, but it still failed with:
Unrecognized VM option 'PermSize=32m'
I dug in deeper and removed the PermSize
setting from /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Now the slash screen was showing up, yet NetBeans would still crash. The ~/.netbeans/7.1.2/var/log/messages.log
file had the following exception:
java.lang.IllegalStateException: java.lang.IllegalAccessException: Class org.openide.util.WeakListenerImpl$ProxyListener can not access a member of class org.openide.filesystems.$Proxy0 with modifiers "public"
This is do to with the Java security manager, everything I tried to disable it made NetBeans not start at all, the only workaround was to force JDK 7 to be used instead. I updated the /Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
file to have the following entry in my case:
Now NetBeans starts as expected.
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...