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 79043

Summary: NetBeans won't launched after JDK upgraded until NETBEANS_JDKHOME specified manually
Product: platform Reporter: johnsonlau <johnsonlau>
Component: -- Other --Assignee: issues@platform <issues>
Status: NEW ---    
Severity: blocker CC: lhasik
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 74497    
Bug Blocks:    

Description johnsonlau 2006-06-25 12:08:24 UTC
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.
Thanks.
Comment 1 _ rkubacki 2006-06-28 10:17:03 UTC
This can be done together with issue #74497
Comment 2 pdxlooie 2006-12-21 13:55:28 UTC
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.
Comment 3 _ rkubacki 2006-12-21 15:07:22 UTC
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
these distributions.
Comment 4 pdxlooie 2006-12-23 10:57:25 UTC
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.
Comment 5 Lukas Hasik 2008-04-10 21:34:23 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 Peter Pis 2008-08-22 08:08:10 UTC
Reassigning to "core". Seems to be fixed.
Comment 7 Lukas Hasik 2008-08-22 12:16:29 UTC
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.