Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-01
8
613 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

791 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