Possible Duplicate:
Changing Java platform on which Netbeans runs
Here is an image of my default JDK (which is 1.6) and the JDK I want to set as default (which is 1.7)
http://tinypic.com/view.php?pic=35ldlye&s=5
If you installed another JDK on your machine and want to choose that for projects, inside Netbeans go to Tools/Java Platforms. Add your new installation. Then when you go to some project's properties, look at the Build/compile settings. Choose your new java platform, and it will be used for your project.
If you have a project open, you can go to file -> project properties. At the bottom of the window you'll find a menu labeled source/binary format. You should be able to select the jdk version there.
You need to set the available JDKs via the Java Platforms dialog. Then, go to Run → Set Project Configuration → Customize . After that, in the opened dialog box, go to menu Build → Compile. Set the version. For those not using Windows, the file to change is netbeans-8.0/etc/netbeans.conf. Comment out the old value and insert the new value.
I had first installed Java 1.5 before installing Netbeans. When i installed Netbeans it took Java 1.5 as the default version. Then i installed Java 1.6 on my machine. I need to change the default JDK of my netbeans to 1.6 not only to a specific project but to the whole Netbeans application. Show activity on this post.
You know, by default, NetBeans IDE sticks with the JDK it found at the time of installation, by storing the path to JDK home in a configuration file called netbeans.conf. You can find this file under NetBeans installation directory > netbeans > etc directory.
Where you already have a project in NetBeans and you wish to change the compiler (e.g. from 1.7 to 1.) then you would need to also change the Java source compiler for that project. Right-click on the project and choose Properties as outlined below:
If I remember correctly, you'll need to set the netbeans_jdkhome
property in your netbeans config file. Should be in your etc/netbeans.conf
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With