10
votes

I'm trying to install the NetBeans "all" package, and, I'm pretty sure I already have Java SE Development Kit installed, however, it's not locating it properly, it comes with an error.

Java SE Development Kit (JDK) was not found on this computer

So I ran the CMD and typed:

netbeans-7.1.3-windows.exe --javahome "C:\Program Files\Java\jdk1.7.0_25"

As I checked, I was in the right directory (E:\Mark\Downloads) where the setup file of netbeans is supposed to be. After pressing ENTER, it did locate JDK, however it would not locate JRE and came up with this error.

Java Runtime Environment (JRE) was not found
There is no JRE at the specified location C:\Program Files\Java\jdk1.7.0_25

So I tried installing the JDK+NetBeans Bundle by Oracle [x86 (32-bit) for Windows (I'm running a 32-bit Windows XP SP3 so it should have worked)] but it says that it's not compatible with my current platform. I also tried --jdkhome but it didn't seem to work at all. Please, this has been going on for two days.

12
Did you try passing the JRE directory path instead of the JDK? - yogiam
check whether jdk path is properly set. - AurA
Hmm... you must be right, since, I tried doing that, and it doesn't locate the JRE at all even at the jre folder, should I redownload? I mean, it must have been in the folder, but it's not. - Mark Paulino
Here is the solution to this problem. Take a look stackoverflow.com/a/27647491/1521346 - Bhuvan
Found the solution here. It worked for me. stackoverflow.com/a/27647491/1521346 - Bhuvan

12 Answers

15
votes

The exe seems to be a wrapper for a jar installer. you can extract the jar installer and run that.

 .\netbeans-8.2-javase-windows.exe --extract netbeans
 java -jar netbeans\bundle.jar

'netbeans' in the above is the name of the folder you want the bundle.jar extracted to it could be anything.

I had a similar error message and couldn't get it to work with the --javahome option but running the jar worked fine.

3
votes

I've fought with this problem, and I use a no-hassle solution for Linux.

Instead of installing Netbeans from https://netbeans.org/, download it from Oracle packaged with JDK.

Here is the current link. It changes all the time though so just google for netbeans jdk in the future.

2
votes

I also was facing this problem,then i found this jre is not installed http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html i installed it,and then opened netbeans.exe ,It ran successfully.

1
votes

The working solution for me was right click on netbeans_installer.exe and choose "Run as administrator". I hope, it will be useful.

1
votes

To be compatible with netbeans version 8, java jdk version 8 should be used. I solved this problem by uninstalling my Java SE Development Kit 13 and installing version 8

0
votes

Just check if JDK is properly installed at C:\Program Files\Java\jdk1.7.0_25.

In case your JDK installation should be compromised, try uninstalling it and re-installing jdk1.7.0_25 at the same location.

0
votes

Dont't try to locate jdk just enter the path for jre(Java runtime environment) which is installed in the same folder if you installed jdk properly.

netbeans-8.2-windows.exe --javahome "C:\Program Files\Java\jre-9.0.1"
0
votes

Get the NetBeans and the JDK together - bundled version. Shouldn't have any problems in installation then

http://java.sun.com/javase/downloads/widget/jdk_netbeans.jsp

0
votes

For me, the main problem was that I installed incompatible JDK version, and the error said "The specified jdk folder does not contain jdk". As said above, the easiest solution is to install the bundle, or install a compatible version of JDK.

0
votes

In my case, I assumed without thinking about it that JDK 11 should work. Then I read this from the Netbeans installation instructions:

The Java SE Development Kit (JDK) 8 is required to install NetBeans IDE.

After downloading JDK 8 and using it to install Netbeans, everything worked fine.

0
votes

I got the same error after using cmd to install Netbeans 8.2 with JDK 13.0.2, but everything was ok after I installed JRE 8 from the official website. I didn't even have to use cmd after installing JRE.

0
votes

For Netbeans 12 the parameter was actually --jdkhome instead.

Create a shortcut to netbeans64.exe then right-click go into properties and add the following into the "target" field (with a space in front of the --).

--jdkhome "C:\Program Files\OpenJDK\openjdk-11.0.7_10"

(Google Adopt OpenJDK if you need the jdk)