Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just bought a Win 7 PC, installed jdk1.6 and Netbeans, NB works fine, but when I did "java -version" in a command prompt, it can't find java, why ? How to fix it ?

Edit : I thought the installation process should set the path correctly, how come it didn't ?

share|improve this question

migrated from Aug 11 '10 at 22:32

This question came from our site for professional and enthusiast programmers.

The JDK installer for windows does not update the path environment variable. The installation docs describe how to do this. See item #4 on that page.

share|improve this answer
Thanks, got it. – Frank Aug 12 '10 at 3:08

The executable probably isn't in your path. What does 'echo %PATH%' say?

share|improve this answer
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind‌​owsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\ – Frank Aug 11 '10 at 18:07

The path to java isn't in your system PATH variable.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .