*
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""java -v" command" Watch ""java -v" command" New topic
Author

"java -v" command

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
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: 19656
    
  18

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 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "java -v" command
 
Similar Threads
Java won't run
tomcat not starting
Installation Problem
how to run in JDK 1.5.1
Java 3D problems