Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Before I installed Java JDK1.6 on WinXP machine I typed from the CMD line

'javac' is not recognized as internal command ...

Here I concluded I did not have a JDK installation on my PC

So, I installed java 1.6.0_30

Usage: javac <options> <source> files . ....

Conclusion: I now have JDK 1.6 installed

c:\java -version 
java version "1.4.2_06"

Conclusion: I don't have JDK 1.6

Discovery: I have the following files on my hard disk as follows:

c:\DevSuiteHome\jre\1.4.2.\bin\java.exe    -- before I installed JDK 1.6
c:\Program Files\Java\jdk1.6.0_30\java.exe -- recently installed.

My PATH Environment points to both JDKs

 c:\DevSuiteHome_1\jck\jre\bin;c:\Program Files\Java\jdk1.6.0_30\jre\bin...

Questions: How can I get 'java -version' to reference 1.6.0_30? Can I expect errors with my java code because I have two JDK versions?

share|improve this question
up vote 3 down vote accepted

It doesn't point to the one you want. Amend your PATH. Remove both these references.

c:\DevSuiteHome_1\jck\jre\bin;c:\Program Files\Java\jdk1.6.0_30\jre\bin

Add this.

c:\Program Files\Java\jdk1.6.0_30

Now open a cmd prompt, then run java -version and hopefully is 1.6

And no you won't get errors having 2 java versions. It'd only use one or the other.

share|improve this answer

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.