aspose file tools
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark ""java -v" command" Watch ""java -v" command" New topic
Author

"java -v" command

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 147
When I run "java -v" on server, I get following error.
Registry key 'Software\Javasoft\Java Runtime Environment\CurrentVersion' has value '1.0', but '1.4' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment

So what does this mean ? Do I need to install jre and java 1.4 version ? This was working fine and there have been no changes, so why is this re
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Open your registry editor (regedit.exe).
Go to HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment.
Open that key so all of its children are visible; there is probably one called "1.4".

Double click on the "CurrentVersion" on the right, and fill in that "1.4" (without quotes; you can also enter 1.5 or 1.6 if that child exist and you prefer that). After pressing enter it should work again.


Now how this problem is created. Have you installed some program lately that is shipped with an older JRE? That could have overwritten this value.

The java.exe inside C:\WINDOWS\system32 uses this piece of the registry to determine which JRE to run. It matches the value of "CurrentVersion" with one of the child keys, which contains the information needed to run the specific JRE.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: "java -v" command
 
Similar Threads
how to run in JDK 1.5.1
Java won't run
Java 3D problems
tomcat not starting
Installation Problem