10

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.

Mark Paulino
  • 113
  • 1
  • 1
  • 5
  • Did you try passing the JRE directory path instead of the JDK? – yogiam Aug 22 '13 at 10:40
  • 1
    check whether jdk path is properly set. – AurA Aug 22 '13 at 10:44
  • 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 Aug 22 '13 at 10:46
  • UPDATE: I set the path on the environment variable right, but then, NetBeans installer still won't locate JRE properly. – Mark Paulino Aug 22 '13 at 11:20
  • possible duplicate of [JDK was not found on the computer for netbeans 6.5](http://stackoverflow.com/questions/13079472/jdk-was-not-found-on-the-computer-for-netbeans-6-5) – Swaroop Dec 12 '13 at 11:52
  • 2
    Here is the solution to this problem. Take a look http://stackoverflow.com/a/27647491/1521346 – Bhuvan Dec 25 '14 at 13:18
  • 3
    Found the solution here. It worked for me. http://stackoverflow.com/a/27647491/1521346 – Bhuvan Dec 25 '14 at 13:19

12 Answers12

16

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.

Faxn
  • 366
  • 2
  • 3
3

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.

IAmALinux
  • 76
  • 4
2

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

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

Studocwho
  • 2,404
  • 3
  • 23
  • 29
1

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

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.

Terry Li
  • 16,870
  • 30
  • 89
  • 134
  • I reinstalled it, and yet, still didn't work, and, I quite noticed that it might be the jre that's causing the problem. I'm not sure, though... where can I get more information? – Mark Paulino Aug 22 '13 at 12:28
  • @MarkPaulino Since jre is bundled inside jdk, Netbeans should be able to find it as long as you install jdk at the right location. From the error information you provided, I suspect 1)you actually installed the right version jdk, i.e., jdk1.7.0_25, but jre inside the jdk directory has been tampered or 2)you didn't install the same version as jdk1.7.0_25 – Terry Li Aug 22 '13 at 12:47
0

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"
D33P
  • 9
  • 1
0

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

Ambareesh
  • 324
  • 1
  • 4
  • 18
0

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.

George
  • 31
  • 1
  • 4
0

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.

Jack J
  • 1,514
  • 3
  • 20
  • 28
0

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.

Andrew
  • 281
  • 3
  • 15
0

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)

Stefan
  • 506
  • 4
  • 8