I want to set the default Java Platform which is used to build my projects in NetBeans 8.2 (netbeans_jdkhome).
Prior versions allowed me to do that. See this answer.
The only problem is that I want to set this platform to be 1.7 (instead of current 1.8), but NetBeans 8.2 requires to run on 1.8, so I cannot have 1.7 as the default Java Platform.
Is there a way to override it?
For now, it appears there isn't any way to override it. Here is NetBeans Help about the Java Platform Manager:
Use to register different versions of the Java Development Kit (JDK) and other Java tools that your programs depend on. The dialog box lists all of your registered JDKs in the left pane and lists the JDK that the IDE is running on as the Default Platform.
So I'll have to change platform for each project, because NetBeans 8.2 can not run with JDK 1.7 (so I can't set it as the default platform).
There is a recent plugin that allows to right-click Maven projects to set the JDK (still cannot set it by default).
You can get your default JDK by: menu Tools → Java Platforms. There you can add all your JDKs and watch their bibs.
If you want to change the default one, you need to go the path C:\Program Files\NetBeans 8.2\etc and you need to change the netbeans.conf file.
In line 57 (in mine) you see something like this:
netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_66"
Change the path to your wanted JDK and you’re finished.
Here is a longer description.
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