Help! Can't execute a program using 'java' command...

Whenever I try to execute a program by typing in:

java programname

I get the following error:

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.3', but'1.2' is required.

It doesn't matter what program I try, I get this message on all of them. I have the jdk1.2.2\bin in my path. Any ideas? Anyone?

[378 byte] By [turtle2520] at [2007-9-26 1:14:08]
# 1

you have certainly installed 2 different version of java, version 1.2 and 1.3 in fact. Your system registry says 1.3 because its the last one you installed, but when your run java at the command line, its the java.exe file of the version 1.2 that gets executed. This executable looks into the registry, expecting to read '1.2' from the registry but just get a '1.3'.

What you can do is set up your PATH variable, so the path to your java.exe executable for the 1.3 java version goes before your 1.2 version executable.

You can also nicely denstall both JDK and/or JRE, and re-install only one of the.

hope this help.

remu at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
I had the same problem.I delete C:\winnt\system32\java.exe file that it had more priority than C:\jdk1.2.2\bin\java.exe
R2D2 at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 3
Your registry key points to Java 1.3 but your path points to Java 1.2.You can set your path properly and it should work ok. If the problem persists try uninstalling java, reinstall it, followed by are-setting of the path.Shubhrajit
shubhrajit_c at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 4
Your registry key points to Java 1.3 but your path points to Java 1.2.You can set your path properly and it should work ok. If the problem persists try uninstalling java, reinstall it, followed by are-setting of the path.Shubhrajit
shubhrajit_c at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 5

Click on Programs-Run

Enter REGEDIT. You'll see a split pane window. On the left hand side

Select HK_LOCAL_MACHINE

Select Software

Select JavaSoft

Select Java Runtime Environment

Now, on the right hand side you'll see 'Current Version' followed by "1.2"; change this to "1.3"

Close the application

Your Runtime should now be set to the correct version.

Hope that helps.

ajeet_20 at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 6
Thanks! I gave this a try and it appears to be working! I wanted to thank everyone else also...it was nice to have so many options to try!
turtle2520 at 2007-6-29 0:30:51 > top of Java-index,Archived Forums,New To Java Technology Archive...