Solved

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

Posted on 2008-10-01
8
617 Views
Last Modified: 2012-05-05


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
Comment
Question by:Greens8301
  • 4
  • 4
8 Comments
 

Author Comment

by:Greens8301
ID: 22620050
Any explaination will be appreciated
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 22632871
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
 

Author Comment

by:Greens8301
ID: 22634795
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 41

Accepted Solution

by:
HonorGod earned 500 total points
ID: 22635148
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
 
LVL 41

Expert Comment

by:HonorGod
ID: 22687826
Thanks for the grade & points.

Good luck & have a great day
0
 

Author Comment

by:Greens8301
ID: 22742688
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
 

Author Comment

by:Greens8301
ID: 22742853
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
 
LVL 41

Expert Comment

by:HonorGod
ID: 22744430
Ah, I missed your subsequent question.  Sorry about that.

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

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio npm 1 29
Review of the nodejs code 1 35
How Close unsubmited attempts 10 42
JS library vs Js framework 11 19
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question