1

I've downloaded Java SE Runtime Environment 6u24 and Java SE Development Kit 6u24, but when I go to CMD and type java -version it still says:

java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)

Edit: yes, I've installed them after downloading.

Edit: this how my PATH looks like

PATH=C:\oracle\ora92\bin;C:\orant14\bin;C:\orant5a\bin;C:\oracle\ora92\jre\1.4.2\bin\client;C:\oracle\ora92\jre\1.4.2\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Wave Systems Corp\Dell Preboot Manager\Access Client\v5\;C:\orant5a\jdk\bin;C:\orant14\jdk\bin;C:\Program Files\QuickTime\QTSystem\

4 Answers 4

6

Check your PATH environment variable, and make sure it contains the installed path java_1.6\bin, not java_1.4\bin.


C:\oracle\ora92\jre\1.4.2\bin

You have 1.4.2 in your path. Remove it and add 1.6 in the PATH.

2
  • I've eddited my post to include the path. should I add it to the path or replace one of the ones included
    – Anonymous
    Apr 2, 2011 at 13:33
  • see my updated answer.
    – James.Xu
    Apr 2, 2011 at 13:39
4

Windows uses the first executable in the PATH that matches the requested command.

In your PATH, you have C:\oracle\ora92\jre\1.4.2\bin as one of the first values. That's why Java 1.4.2 is being executed.

(Small Note: If you change the PATH to not first reference the Java 1.4.2 executable, it may cause some other app to not work, if for some reason it requires Java 1.4.2 and won't work with a newer version. This is highly unlikely to be a problem, unless you're switching from a 32-bit Java runtime to a 64-bit runtime, in which case there are a few apps that break.)

3

You need to install the runtimes, not just download them.

2
  • 1
    of course ive installed them. are you trying to be funny?
    – Anonymous
    Apr 2, 2011 at 13:30
  • 1
    @user, not trying to be funny. You only mentioned you downloaded them, I was just making sure that you had remembered to install them. I don't know if you are running on two hours of sleep or not.
    – jzd
    Apr 2, 2011 at 13:37
3

As recommended @ http://www.java.com/en/download/faq/remove_olderversions.xml you should uninstall all previous versions of Java when you update to a newer version.

1
  • 1
    +1: Java installers have, until recently, been very poor at dealing with existing installations; remove them all and start over for best results. The Java control panel can also be useful in determining which versions of Java are installed, and where they are.
    – boot13
    Apr 2, 2011 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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