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 248456 - Selecting JDK version does not cause update of file netbeans.conf
Summary: Selecting JDK version does not cause update of file netbeans.conf
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.0.1
Hardware: PC Windows 8 x64
: P3 normal with 1 vote (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 11:53 UTC by chjan
Modified: 2015-09-22 11:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chjan 2014-11-06 11:53:09 UTC
When a new jdk is installed on the computer, and the previous version is removed, Netbeans will at startup be unable to find the default JDK, but will offer the user to select the latest installed JDK.

The error: This user preference is not stored in netbeans.conf, having the consequence that the same question is asked the next time NB ide is started.

Checking for version under Tools\JavaPlatforms, the latest and newly installed version is indeed registered there, NOT according to info in the netbeans.conf.

It is natural to ask therefore: Is the JDK configuration stored several places?

Remedy: Update netbeans.conf for all known user-features where the user is able to set the default JDK.

This bug is severe because it looks very unprofessional when the NB platform is unable to configure itself on even the basic engine of the ide. NOT?
Comment 1 rasamassen 2015-09-21 20:25:43 UTC
As a person who uses NetBeans for web development and not Java development, I completely don't care what JDK I'm using and my JDK gets updated automatically on Windows. As a result, this issue has come up constantly over the past years and on Windows, changing netbeans.conf is not hard, but a great annoyance on my time.

Basically, I think when NetBeans starts up and asks you if you want to try the default JDK, there should be a checkbox included to updated netbeans.conf to the latest JDK at the same time so that it remedies the error itself.
Comment 2 Jiri Kovalsky 2015-09-22 10:36:37 UTC
Reassigned for further evaluation. BTW, I cannot reproduce it on Linux i.e. when I remove the JDK used to install & run NetBeans 8.1 Beta, the IDE then refuses to start. However, if I comment out the netbeans_jdkhome= setting in the etc/netbeans.conf, NetBeans starts using another available JDK. Downgrading priority unless we have a reliable steps to reproduce that JDK auto-discoverability is totally broken.
Comment 3 Jiri Prox 2015-09-22 11:37:53 UTC
Reproducible

Steps to reproduce:
1) install IDE, using JDK X
2) uninstall JDK X
3) run IDE
-> the prompt is shown 'Do you want to try to use default version?'
-> the user preference is not written to netbeans.conf, e.g. in the conf file is still the JDK X, so the question will be shown again on next start up


Workaround:
remove the line JDK_HOME= from  netbeans.conf so the IDE will always use default version

IMHO the workaround is simple and the issue itself does not block using IDE -> P3