30

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.

schlebe
  • 3,387
  • 5
  • 37
  • 50
Learnerer
  • 543
  • 1
  • 5
  • 13

3 Answers3

80

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.

Just a student
  • 10,560
  • 2
  • 41
  • 69
  • 2
    I just downloaded Netbeans 9 from https://netbeans.apache.org/download/index.html and confirm that this answer work! It MUST be JDK only, cannot working on JRE like this page said ( http://wiki.netbeans.org/FaqRunningOnJre ). But I'm very disappoint that PHP support was dropped. I must go back to Netbeans 8 again. – vee Aug 01 '18 at 08:40
  • Exact answer i am looking for – Muhaiminur Rahman Nov 27 '18 at 07:10
  • 1
    Thank you. I found JDK11 at https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html and then used `netbeans_jdkhome="C:\Program Files\Java\jdk-11.0.1"` in `etc/netbeans.conf`. And this seems interesting: https://www.reddit.com/r/PHP/comments/9gtaaw/how_to_run_netbeans_9_with_php_support/? – Ryan Dec 13 '18 at 18:59
  • 1
    Thank you! Works for Netbeans 10! Also, JRE is enough if you plan on using PHP. – Michał Skrzypek Jan 02 '19 at 23:09
  • That's working for NetBeans.exe BUT when I start NetBeans64.exe I see only a BLACK windows. On 32 bits version, some dialogbox are displayed but on 64 bits version, a page with some help are displayed and then the screen has been blocked displaying a BLACK screen. Now after 10 minutes, I have started 64 bits versions and it works now correctly ! This is very strange. – schlebe Jan 11 '19 at 06:57
  • That is working on 9 and 10, but when I open a first existing project using Netbeans 10 or Netbeans 9 x64, Netbeans applicqtion is displayed that project is loading ... infinitely (the load percentage displayed is 10%). The only solution for me is to use Netbeans 9 x32 ! – schlebe Jan 11 '19 at 07:27
1

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

0

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.

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57