Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Aug 11 '10 at 22:32

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

3 Answers 3

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 path to java isn't in your system PATH variable.

share|improve this answer

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.