Mark Paulino
Mark Paulino

Reputation: 113

NetBeans installer Not locating Java properly

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.

Upvotes: 10

Views: 51929

Answers (12)

Stefan
Stefan

Reputation: 525

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)

Upvotes: 0

user9449362
user9449362

Reputation:

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

Upvotes: 1

Andrew
Andrew

Reputation: 301

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.

Upvotes: 0

user10925105
user10925105

Reputation: 11

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

Upvotes: 1

Jack J
Jack J

Reputation: 1644

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.

Upvotes: 0

Amish Joshi
Amish Joshi

Reputation: 21

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.

Upvotes: 2

George
George

Reputation: 41

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.

Upvotes: 0

Ambareesh
Ambareesh

Reputation: 363

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

Upvotes: 0

Faxn
Faxn

Reputation: 376

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.

Upvotes: 16

D33P
D33P

Reputation: 9

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"

Upvotes: 0

IAmALinux
IAmALinux

Reputation: 76

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.

Upvotes: 3

Terry Li
Terry Li

Reputation: 17268

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.

Upvotes: 0

Related Questions