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?
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 >

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
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
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.