• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"java -v" command

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic