131

I have windows 10 OS, I just downloaded JDK 9, and Netbeans 8.2 version with All features. When I want to create (Java) project, it just can't do it. Doesn't give me an error or something, just this blank screen.

enter image description here

What could be problem here, so I can't create any project ?

Nemus
  • 3,879
  • 12
  • 38
  • 57

14 Answers14

123

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.

  1. Go to the folder "C:\Program Files\NetBeans 8.2\etc", or wherever NetBeans is installed.
  2. Open the netbeans.conf file.
  3. 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.
  4. Save the file, and restart NetBeans. It worked for me, should do for you too.
Kingsley Ijike
  • 1,389
  • 1
  • 8
  • 13
74
  1. You can solve your problem by deleting folder JDK-9.
  2. Restart Netbeans.
  3. It will give you a message if you want to use the default version of JDK.
  4. Press yes or ok.

Or you can remove JDK-9 from your pc and install JDK-8.

Viktor
  • 2,623
  • 3
  • 19
  • 28
nada
  • 764
  • 6
  • 3
  • 31
    You don't have to uninstall jdk-9 from the PC. You just need to set the value of "netbeans_jdkhome" with the path to an earlier JDK in /etc/netbeans.conf to change the jdk that is used to run netbeans. – aro_tech Oct 11 '17 at 11:32
  • FYI: There was no message in my case. I had to go to the command line and specify the path to the JDK explicitly. – Regis May Mar 09 '18 at 11:17
  • Just @aro_tech says, just have careful to see if you have in the folder C:\Program Files\Java\jdk... the JDK compatible with your Netbeans, remember that jre and jdk is not the same... – David Lopes Sep 12 '18 at 10:31
  • @aro I am also facing the same problem at starting when I install netbean firstly I am unable to create a java application but after some days my java products enable problem is solved automatically but still I am unable to create other project like maven , c++ etc. I am using jdk7 and netbeans v8.0. Please suggest some steps to resolve this problems – Akash Oct 25 '19 at 13:17
46

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

BlueDev
  • 557
  • 3
  • 13
23

I had the same problem I installed NetBeans 8.2 on macOS High Sierra, and by default settings, NetBeans will work with the latest JDK release (currently JDK 9).

NetBeans Problem

What I did was forcing NetBeans to use JDK 8, you must config your netbeans.conf file, you can find it on:

/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf

enter image description here

You need to uncomment and update your path to JDK, you will find yours at:

/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home

enter image description here

Just save it, restart NetBeans and you are done!

Abraham
  • 8,525
  • 5
  • 47
  • 53
12

If you run in linux, open file netbeans.conf using nano or anything else.

nano netbeans-8.2/etc/netbeans.conf

and edit jdkhome or directory for jdk

netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-amd64"

you can check your jdk version with

java -version

or

ls /usr/lib/jvm
Elbo Shindi Pangestu
  • 2,021
  • 2
  • 12
  • 24
  • 2
    Excellent! This worked for me - have default Java 11 and OpenJDK 8, Netbeans installed with umake. Thereafter nothing worked or not menu items worked, until: 1. changed my default Java with sudo update-alternatives --config java; to option /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; 2. Found location of /home/myusername/.local/share/umake/ide/netbeans/etc/netbeans.conf; 3. Added line netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-amd64" - almost as in point 1. The important stuff was main folder, not the executable. – uldics Jul 01 '18 at 09:36
7

Java SE Development Kit 9 is not compatible with the Netbeans IDE 8.2.

My Solution:

  1. Delete the current JDK 9
  2. Install this previous trust version of JDK: JDK 8
  3. Modify the following file: \Program Files\NetBeans 8.2\etc\netbeans.conf to the given folder path of the newly installed JDK 8: netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_151" (example)
testtamas
  • 71
  • 3
  • 4
    thanks for your tip! I have edited D:\Program Files\NetBeans 8.2\etc\netbeans.conf and set netbeans_jdkhome="D:\pierre\Java\jdk1.8.0_144" instead of netbeans_jdkhome="D:\pierre\Java\jdk9" and it worked. No need to delete jdk9. – Pierluigi Vernetto Dec 02 '17 at 09:46
6

Faced same issue with jdk 10. While installing netbeans prompted for jdk default location was taken as jdk 10. This was the issue, it should be jdk8 (1.8).

  1. Close Netbeans
  2. Open below file
    C:\Program Files\NetBeans 8.2\etc\netbeans.conf
  3. Comment jdkhome line jdk9 or jdk10 with # sign:
    # netbeans_jdkhome="C:\Program Files\Java\jdk-10.0.1"
  4. Add new jdkhome line for jdk8:
    netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_171"
  5. Start Netbeans

Note: If the above .conf file is not editable, then use Administrator mode. I use Notepad++, it prompted for restarting Notepad++ in Administrator mode, then save worked fine.

Manohar Reddy Poreddy
  • 25,399
  • 9
  • 157
  • 140
2

I had the same issue,

  • Quit Netbeans.
  • Delete the JDK9 file in : /Library/Java/JavaVirtualMachines
  • Install the JDK8 : Download link

Good luck :)

DevMachine
  • 553
  • 3
  • 6
  • 15
1

@ubuntu 18.04

sudo apt install openjdk-8-jdk
then
sudo update-alternatives --config java


  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

choose java 8 then restart netbeans
Done

A.Raouf
  • 2,171
  • 1
  • 24
  • 36
  • I need theese steps but also thoose described in https://stackoverflow.com/a/48381790/1315873: restarting netbeans sais **"The JDK is missing and is required to run some NetBeans modules** [...] – Fil Nov 19 '19 at 18:16
0

Yes it s working: remove the path of jdk 9.0 and uninstall this from Cantroll panel instead install jdk 8version and set it's path, it is working easily with netbean 8.2.

  • I didn't uninstalled jdk9.0. Just installed jdk8_u162 and updated in /etc/netbeans.conf with netbeans_jdkhome="". On restarting the NetBeans it worked. You might need to activate Java plugins if you had deactivated earlier. – Tarun Apr 12 '18 at 14:50
  • There is no need to uninstall JDK 9 at all. You might consider rewording or deleting your answer. – skomisa Nov 28 '19 at 05:49
0

I tried setting netbeans_jdkhome="/path/to/jdk-9.0.4" in netbeans.config of "C:\Program Files\NetBeans8.2\etc" in Windows 10. It shows a notification "Unexpected Exception".

Tarun
  • 748
  • 1
  • 13
  • 30
0

For anyone that wants to download jdk 8 without an oracle account: https://download.oracle.com/otn-pub/java/jdk/8u271-b09/61ae65e088624f5aaa0b1d2d801acb16/jdk-8u271-windows-x64.exe copy and paste the link. Jdk 15 didn't work for me so i tried using jdk 8 and it worked.

0
  1. Open notepad as administrator(right click on it then click run as administrator)
  2. Open the following document from Netbeans directory via Notepad file->open. Make sure where it was installed.

C:\Program Files\NetBeans 8.2\etc\netbeans.conf

  1. Add the following path;

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_171"

  1. Save it as netbeans.conf in the same place.
  2. Now open the Netbeans.. Everything will work properly but you will be notified regarding jdk path in the beginning..
Ben
  • 395
  • 1
  • 5
  • 16
0

This is how it worked for me :

  • Open Netbeans - A start page will be opened automatically.
  • On start page you can see a tab named 'Activate Features', click on it.
  • Select all plugins that are installed and appeared there.
  • Click on 'Activate' button. Restart the IDE. You are good to go.