Learnerer
Learnerer

Reputation: 583

Java not found error when loading Apache Netbeans 9.0 or 10

I downloaded the archive for the program, unzipped it to C drive on Windows, then when I try to run either executable (32bit/64bit) in the bin folder I get the error message:

Cannot find JAVA 1.8 or higher.

in spite of Java 10 (JRE) being already installed. I also tried Installing Java 9 but was stuck with the same message.

I appreciate your help with this, Thanks.

Upvotes: 34

Views: 39290

Answers (3)

Ali Hamza Ansari
Ali Hamza Ansari

Reputation: 21

This is the issue of compatibility of Netbeans with your installed jdk version

Locate your etc/netbeans.conf file and Open it. In the #netbeans_jdkhome="C:\Program Files\Java\jdk-17.0.1" replace the given path with your installed jdk. It will work

Upvotes: 2

Andrew Teoh
Andrew Teoh

Reputation: 21

I experienced the issue after I updated Java and the version changed but the netbean.conf had the older version which is invalid.

The remedy is go into that file via notepad, or any text editor and then update the path with the correct version number, i.e. netbeans_jdkhome="C:\Program Files\Java\jre1.8.0_311".

You would go determined your latest Java edition, by pulling up the Java control panel and then hit the middle "Java" tab, hit "View" to see the current version you have installed.

Upvotes: 0

Just a student
Just a student

Reputation: 11020

Locate your Netbeans installation and in it the etc/netbeans.conf file. Open it with any text editor, and locate the line containing netbeans_jdkhome. If it is commented out (line starts with #), then remove the # to enable the setting. Then, set the value to the path to your JDK. This might be somethiing like C:\Program Files\Java\jdk-10.0.1.

Try to run the program again, it should work now. At least, it did for me.


Also, ensure that you installed the Java Development Kit (JDK), not only the Java Runtime Environment (JRE). Netbeans needs the former to be installed in order to function.

Upvotes: 86

Related Questions