• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 685
  • Last Modified:

why JDK and JRE must be same version Can we mix and match



I like also to understand why there is a conflict when  jdk1.5.0_10 and jre1.6 are on the same directory,without  jre1.5 not  in the directory. There is a message like "multiple vm process run at the same time" displays when some application that need runtime java is run

0
Greens8301
Asked:
Greens8301
  • 4
  • 4
1 Solution
 
Greens8301Author Commented:
Any explaination will be appreciated
0
 
HonorGodCommented:
ok, the reason is that the JDK include a Java compiler (javac) which creates the "byte code" executable code.  The JRE does not have this compiler, it only include the Java Virtual Machine to execute the code created by a Java compiler.

So, the code created by a compiler of one version may be incompatible with a different JRE.

The two that you mention (i.e., JDK 1.5 and JRE 1.6) can't share the same directory because some files exist in each that are identical, and some that aren't.

They can, however, exist on the same machine, just not in the same directory.

Hopefully this helps.
0
 
Greens8301Author Commented:
HonorGod,

Thanks

I have a situation. Now I have jdk1.5 and jre1.5 on the sam directory. Do not have jdk1.6 or jre1.6.
An application was running well before I removed all versions of java and installed JDK1.5 and JRE1.5

If I want the same functionality of the application now, do I just install JRE1.6. If so is it possible to install JRE1.6  alone without the JDK1.6  component
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
HonorGodCommented:
One thing that may not be clear to you is that a JRE is a proper subset of a JDK.
This means that all of the functionality (and files) that exist in a JRE also exist in
a JDK.  The JDK has the additional files necessary to compile your Java Applications.

If you want to install a 1.6 JRE, or JDK you can do so, just not to the same directory that exists and contains your 1.5 JDK or JRE.

Install it to a separate directory, and you should be just fine.

Right now, I have a 1.4.2 JDK directory, and a 1.5 JDK directory, and a 1.6 JDK
directory all installed (and usable) on my machine.  To use one, I just set up
my environment variables to point to the appropriate directory structure.

Hopefully this helps.
0
 
HonorGodCommented:
Thanks for the grade & points.

Good luck & have a great day
0
 
Greens8301Author Commented:
How do I install JDK and JRE different version on different directory 1.6 in one directory and 1.5 in another directory.

Do I specify while installation ?

Thanks
0
 
Greens8301Author Commented:
I have figured it out
I was initially confused with directory path , I found that it will also include JDK1.5.0_16

It works
Thanks
0
 
HonorGodCommented:
Ah, I missed your subsequent question.  Sorry about that.

I'm glad that you got the answer.  Thanks for sharing it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now