This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to run java.exe from command prompt!

 
Raghav Sam
Ranch Hand
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run the java.exe at the command prompt the following error occurs:

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
.
I recently installed jdk 1.4. I just wanted to run an application from the command prompt and suddenly the above error is reported. However, javac works. So its not a 'PATH' problem. I suspect some problem with the registry. I did try to tinker with it. But I couldnt identify the problem. I am using Win 98.
All other applications using jdk 1.4 like Forte are working fine.
What could be the problem?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like your path and classpath are pointing at 1.3, so you compile it at jdk1.3 and invoke the jdk1.3 JVM, but when the system runs to the registry to find JAVA_HOME it sees 1.4 as the current version. So it complains that it can not find the 1.3 version (although WHY that should matter is unclear).
When you installed the 1.4 version, this all should have been updated for you . Did you install Forte afterwards perhaps and mess things up???
If you still have the downloaded executable for installing 1.4 why don't you try just executing that again.
 
Raghav Sam
Ranch Hand
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cindy Glass:
It sounds like your path and classpath are pointing at 1.3, so you compile it at jdk1.3 and invoke the jdk1.3 JVM, but when the system runs to the registry to find JAVA_HOME it sees 1.4 as the current version. So it complains that it can not find the 1.3 version (although WHY that should matter is unclear).
When you installed the 1.4 version, this all should have been updated for you . Did you install Forte afterwards perhaps and mess things up???
If you still have the downloaded executable for installing 1.4 why don't you try just executing that again.

My PATH and CLASSPATH both point only at 1.4. And 1.3 is not in my system! (it was there is my system previously and i unistalled it before putting 1.4) Also all other binaries like jar, javac, appletviewer etc. work fine at the command prompt.
I have already tried reinstalling 1.4, but its no use.
I just now tried running regclean. still no use!
 
Dakshinamurthy Ramachandran
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very crude think ...
Just changed the Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
from '1.4', to '1.3'. Try then. Let us know what you are getting ....
 
Raghav Sam
Ranch Hand
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dakshinamurthy Ramachandran:
Very crude think ...
Just changed the Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
from '1.4', to '1.3'. Try then. Let us know what you are getting ....

the following error:

Error opening registry key 'Software\JavaSoft\Java Runtime Environment\1.3'
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
 
sandyboy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
uninstall and install again and then restart your machine
 
Ashok Mash
Ranch Hand
Posts: 1936
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dakshinamurthy Ramachandran:

Just changed the Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
from '1.4', to '1.3'.

This is a sure fix. I used to do the same, then (in 2000) the conflict was between 1.2 and 1.3
Last of all, I will suggest you to uninstall all installed JVMs, remove every trace of anything that looks like a JVM , and then install only one ( 1.3 or 1.4 ) JVM.
Also, I have noticed that its always good to uninstall the existing JVM before installing a new one.
And yes, if you are using M$ Window$, don't forget to restart after every install/uninstall/mouse click
Cheers,
Ashok.
 
Raghav Sam
Ranch Hand
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J Ash:

This is a sure fix. I used to do the same, then (in 2000) the conflict was between 1.2 and 1.3
Last of all, I will suggest you to uninstall all installed JVMs, remove every trace of anything that looks like a JVM , and then install only one ( 1.3 or 1.4 ) JVM.
Also, I have noticed that its always good to uninstall the existing JVM before installing a new one.
And yes, if you are using M$ Window$, don't forget to restart after every install/uninstall/mouse click
Cheers,
Ashok.

Sure enough, I removed every trace of java from my system and also some keys of the registry which I thought as the trouble-makers. After that I reinstalled jdk1.4 and now everythings working fine. Thanx all of you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic