Can't create project on Netbeans 8.2
EDIT: The solution is to install JDK 8, as JDK 9 and beyond are currently not supported.
If however, you already have installed JDK 8, then kindly follow the steps outlined below.
The reason is that there is a conflict with the base JDK that NetBeans starts with. You have to set it to a lower version.
- Go to the folder
"C:\Program Files\NetBeans 8.2\etc"
, or wherever NetBeans is installed. - Open the
netbeans.conf
file. - Locate
netbeans_jdkhome
and replace the JDK path there with"C:\Program Files\Java\jdk1.8.0_152"
, or wherever your JDK is installed. Be sure to use the right path, or you will run into problems. Here,JDK 1.8.0_152
is installed. - Save the file, and restart NetBeans. It worked for me, should do for you too.
- You can solve your problem by deleting folder
JDK-9
. - Restart Netbeans.
- It will give you a message if you want to use the default version of JDK.
- Press
yes
orok
.
Or you can remove JDK-9
from your pc and install JDK-8
.
As the other people said, NetBeans is always going to use the latest version of JDK installed (currently JDK9) which is not working with NetBeans 8.2 and is causing problems as you guys mentioned.
You can solve this problem by forcing NetBeans to use JDK8 instead of deleting JDK9!
You just have to edit netbeans.conf
file:
MacOS /Applications/NetBeans/NetBeans8.2.app/Contents/Resources/NetBeans/etc
Windows C:\Program Files\NetBeans 8.2\etc\
Open netbeans.conf with your favourite editor and find this line: netbeans_jdkhome="/path/to/jdk"
Remove # sign in front of it and modify it by typing your desired JDK version (JDK8) home location.
Im not sure why is JDK9 not working with NetBeans8.2, but if I found out I will write it here...
Default JDK locations:
Mac OS ↴
/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home
Windows ↴
C:\Program Files\Java\jdk1.8.0_152
I've used jdk1.8.0_152 as example