Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Different Java versions

 
Jessica Lang
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After compiling a sample pgm, I tried running the pgm by issuing "java Welcome", but the following error message is encountered:
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.3', but '1.2' is required.
I am running jdk1.3.1. Any clue on the above?
Thanks....
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that you have installed 1.3.1, but you are still running 1.2 when you type "java". type
PATH
and see if you have a java 1.2 "bin" directory in it.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd probably try to reinstall the JDK 1.3.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and uninstall any older JDK's like e.g. 1.2.x
Rene
 
Jessica Lang
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have figured out the problem...which I would like to share here...
I have a Dietel Java Learning app installed on my pc that uses jre 1.2. However, I tried compiling and running the Welcome program under jdk1.3.1. This has resulted in the version conflict.
I think I will try to uninstall jre 1.2 and let jre 1.3.1 be default. Hopefully, my Dietel Java learning app can still run under jre 1.3.1....
 
Jessica Lang
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is solved.... I checked the "Programs Installed" at the Control Panel and discovered that I had the following:
*** JRE 1.2 (used by Dietel)
*** JRE 1.3
*** JDK 1.3
First, I uninstalled JRE 1.2 only, but the java program wouldn't run. So, I ended up unistalled all of them and reinstall JDK1.4 and also changed the PATH accordingly under the "Env var". Now, the program runs perfectly. My pc (env) is all ready to move on to Java now.....
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic