Could NetBeans find the installed JDK on the system automatically?
If I upgraded JDK to a higher version, I launched NetBeans and got a error message.
What I had to do to make NetBeans work properly is that I must change the JDK
home variant 'netbeans_jdkhome' in the file netbeans.conf manually and launch again.
I think it is better that NetBeans automatically search for the proper JDK if it
found that the specified netbeans_jdkhome is not available.
I don't know whether this has been submited by someone. If it did, ignore it plz.
This can be done together with issue #74497
As a follow-on to this annoyance, note that in the linux 5.5 (I don't have a
Windows version available right now), you can't even change or upgrade the
version from within Java Platform Manager in the IDE itself. You can add a new
JDK platform but you cannot change the default. So, the ONLY way you can
upgrade the JDK for NetBeans 5.5 is to manually change netbeans.conf. I do not
think this should be considered an acceptable design. The user should be able
to change the default JDK from within the tool.
The selection of JDK used to run NetBeans has to be independent from Java
Platform Manager because NetBeans is also a platform and there are many uses
without this manager.
Most common cases should work on Windows now. To do it better on Linux it would
be great to know about general way how to recognize what Java is installed and
where. This is not simple when JDK is not part of distributions yet and even
when it will be there we have to solve differences in software management in
On linux, you could start by looking at JDK_HOME. Another option is to look at
the PATH (simply System.exec("which java") on any linux system will tell you
whether it's in the user's path). If you want to see a really clean approach to
resolving this issue on Windows, install Bluej on a Windows system without a JDK
and then launch it. As far as upgrades of the JDK are concerned, there may be a
NetBeans "platform," but I am not using the platform, I'm using the NetBeans
IDE. Requiring the editing of an obscure text file to upgrade the JDK does not
mesh well with the image of a polished, highly sophisticated IDE, which is the
image we all want of NB. Thanks.
moving opened issues from TM <= 6.1 to TM=Dev
Reassigning to "core". Seems to be fixed.
it is not fixed. IDE will use the JDK that you have specified at install time till you change it. And there are only two
ways how to change it now - 1, command line switch --jdkhome 2, etc/netbeans.conf
IMO, there could be simple UI that would allow the user of IDE (not platform) to change the netbeans_jdkhome in
netbeans.conf file. That's why I'm leaving opened.