[73cat] Re: JDK recognition during NetBeans installation

  • From: Siddharth Kumar Singh < >
  • To: " " < >
  • Subject: [73cat] Re: JDK recognition during NetBeans installation
  • Date: Sun, 4 Nov 2012 07:50:55 +0530

Hi Martin

To allow Netbeans to use your JDK installation, you need to set up the path in your windows PATH variable first. Now typically when adding a new folder to the path, you can simply add it at the end of the string but in the case of JDK, the folder path must be added to the string before the entry for the Windows home directory (characterised by %SYSTEMROOT%). Many people recommend adding it to the beginning of the path string but I find that unnecessarily risky because many other applications (like Oracle server) require their path string to be first in the path variable and so you may inadvertently break something else while installing Java. So just copy the PATH variable string into a notepad window and add the path to java.exe to the string right before the entries for %SYSTEMROOT%. The path would be something like <location_you_installed_jdk>\bin
To test your installation of Jjava, go to the Windows command prompt and execute the following two commands:

java -version

javac -version

Both these commands should execute successfully without error and give you the same version number.
Additionally, if you're using Windows 7 or higher, you can also execute the following command:

where java

This will list all the locations where Windows is able to find java.exe (locations covered in the path variable of course). You want your installation to appear above C:\Windows\System32\java.exe

Hope this helps


On Sat, Nov 3, 2012 at 12:20 AM, Crazy Java < " target="_blank"> > wrote:

in the recent build of NetBeans I had uninstalled JDK and NetBeans installer realized that and printed "No compatible JDK was found" message on the first screen of the installer. After I installed the JDK the installer correctly recognized installed JDK even if java was not set on classpath.

I was wondering how the recognition works. I am using Win OS. Does the installer do some filesystem checks, some lookup in windows register or how does it work?

Martin Skurla


[73cat] JDK recognition during NetBeans installation

Crazy Java 11/02/2012

[73cat] Re: JDK recognition during NetBeans installation

Jiří Kovalský 11/03/2012

[73cat] Re: JDK recognition during NetBeans installation

Michael Müller 11/03/2012

[73cat] Re: JDK recognition during NetBeans installation

Scott Palmer 11/03/2012

[73cat] Re: JDK recognition during NetBeans installation

Siddharth Kumar Singh 11/04/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 25 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm