NetBeans Tip: Changing JDK Versions

When you install a new JDK on your PC, NetBeans doesn’t automatically use the new JDK, rather it will continue to use the JDK that was defined when NetBeans was installed. This isn’t generally a problem unless you’ve uninstalled the original JDK when installing a new version.

If the JDK that you specified does not exist when NetBeans starts up, is will display an error dialog saying that the original JDK cannot be found and asking if you want to use the default version.

Default JDK?

Default JDK?


To overccome this problem, we can tell NetBeans which JDK to use. This is done by editing the file NetBeans\etc\netbeans.conf. Within this file, the default JDK to use for NetBeans is defined by the netbeans_jdkhome attribute.

netbeans_jdkhome=”C:\Program Files\Java\jdk1.6.0_13″

Change this attribute to the path of the JDK that you wish to start NetBeans with, restart the IDE and the appropriate JDK will be used.

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Facebook Post to Reddit

This entry was posted in Java and tagged , . Bookmark the permalink.

One Response to NetBeans Tip: Changing JDK Versions

  1. C says:

    very useful :D
    I literally spent an evening trying to upgrade to the newest JDK I had installed, until I fell here

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>