• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

has value '1.1', but '1.4' is required. problem

 
Murali Mohan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have installed j2sdk1.4.1_02.
path is -------set path=%path%D:\j2sdk1.4.1_02\jre\bin;.;
classpath is -------set classpath=%classpath%D:\j2sdk1.4.1_02\lib\tools.jar;.;
But when I run a program after successfull compilation I am getting following message.
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.1', but '1.4' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.
Can u pls help me in this issue?
Thanks,
Murali
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that you have another program which has installed java 1.1, perhaps an older IDE a shareware/freeware program. If you have an idea which program it is, the easiest thing to do is uninstall that program. If not, you can search your windows registry and perhaps you can figure out which program it is.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any tips on having multiple versions of Java on a machine? I'd like to put a program that requires 1.4 on a machine that must have 1.2.2 as its default. I had hoped to make a JRE1.4 directory and start my program with a batch file that sets up the path, classpath, etc for just that process. Will this registry thing bite me?
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general there shouldn't be a problem with running multiple versions of the Java VM on a single machine. You just have to be careful how you set up the environment. If you are using multiple version, you should probably explicitly set the JAVA_HOME and CLASSPATH and path to "java" and "javac" rather than rely on the environment settings.
Either set the values in batch files that will compile and execute your programs (different batch files for each version), or use a tool such as "ant" to manage your builds.
If you don't know what version(s) of Java are installed, doing "java ..." can be dangerous. To ensure you execute a specific version, do "C:\j2sdk1.4\jre\bin\java" or "C:\j2sdk1.4\bin\java" and give the classpath you want to use. You shouldn't have registry problems as long as you set up the batch file correctly.
[ October 10, 2003: Message edited by: Wayne L Johnson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic