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.
Netbeans should detect new JDK home if the new one is different from the old one.
What does it mean 'new JDK home'? What is the result of such detection?
If I upgrade to newer version of JDK, Netbeans cannot start 'cause the JDK folder it is changed. Example: the old one is "C:\Program Files\Java\jdk1.6.0_01", but the new one is "C:\Program Files\Java\jdk1.6.0_02". At this time I cannot start Netbeans and it only shows a message that it cannot find java.exe.
What version of NB do you have? According to this bug report it is some 6.0 build OTOH this should be fixed there and if netbeans.conf refers to non-existing JDK dir a suitable one found in Windows registry will be used.
I have this problem with M8.
I have this problem with NB 5.5 on WinXP. It took me a while to figure out where this setting was stored because Windows search wasn't finding "1.6.0" in the right files. I used the NB FAQ and discovered it in: C:\Program Files\netbeans-5.5\etc\netbeans.conf # default location of J2SE JDK, can be overridden by using --jdkhome <dir> switch netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_01" It may also be in C:\Documents and Settings\%user%\.netbeans\5.5... At a minimum I would recommend a better error message pointing the user to the netbeans.conf file. Better would be to implement the same search and selection feature used in the NB installer if no JDK is found at the netbeans_jdkhome location. Anyone upgrading JDK's is going to run into this issue and it would be nice if NB could help them out more. I would mark this as a feature rather than defect (unless there really is registry search code that exists but is not working).
Well. Previous patch helped if there was no jdkhome specified in netbeans.conf. Now it ignores jdkhome from .conf file or from command line if it refers to a directory with no java.exe. It means case of this bug should be fixed. OTOH it would be easier to revert this and have uninitialized jdkhome in netbeans.conf on Windows. That way we can always rely on Windows registry to get appropriate JDK. JDK upgrade would work too and behavior of launcher could be transparent (it is not after this patch). Checking in nbexec.cpp; /shared/data/ccvs/repository/core/launcher/windows/nbexec.cpp,v <-- nbexec.cpp new revision: 1.31; previous revision: 1.30 done Checking in nbexec.exe; /shared/data/ccvs/repository/core/launcher/windows/nbexec.exe,v <-- nbexec.exe new revision: 1.30; previous revision: 1.29 done
*** Issue 102858 has been marked as a duplicate of this issue. ***