This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes JRE VS JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "JRE VS JVM" Watch "JRE VS JVM" New topic
Author

JRE VS JVM

kumm redd
Ranch Hand

Joined: Nov 02, 2004
Posts: 31
hi all
sorry for asking the following crazy question

JDK : development evironoment which is superset of all
JRE : set of runtime classes subset of JDK
JVM : intrepreter which depends of OS for conversion of byte code to HW understable code.subset of JRE.

why does sun provide JRE for each operating system..isnt JRE same for any OS? why not they just supply JVM for different problems.

please let me know..
raj
Premil Jacob
Ranch Hand

Joined: Sep 10, 2004
Posts: 30
Raj,

The JVM as the name stands for is a Virtual Machine i.e, its an imaginary machine which sits on top of ur Machine or P.C. The code that executes on this Virtual Machine is the byte code.

The Virtual Machine makes use of the JRE or Java Runtime Environment to convert the byte code to the actual binary language that is used by the underlying hardware. So you just need a matching JRE for your particular platform to execute Java Byte code.

So you get a layout like this

Java Code
| (Compiled to give)
V
Java Byte Code
| (Runs on)
V
Java Virtual Machine
| (Makes use )
V
Java Runtime Environment
| (to give)
V
Binary Code that runs natively on ur P.C.


Thanks,<br />Premil<br /> <br />SCJP 1.4
kumm redd
Ranch Hand

Joined: Nov 02, 2004
Posts: 31
hi premil

Thanks for explaining it..got it but have a small doubt..i.e

Here is the fig which shows the components of j2se

http://java.sun.com/j2se/1.5.0/docs/index.html

could you please look at fig and tell me atleast one component of jre that are necessary for specific JVM of OS

ciao
Premil Jacob
Ranch Hand

Joined: Sep 10, 2004
Posts: 30
hmm...I'm not sure what your question is Raj, check out this link I guess it should clear up any doubts you should have

http://math.hws.edu/javanotes/c1/s3.html
kumm redd
Ranch Hand

Joined: Nov 02, 2004
Posts: 31
hi premil
Thanks for giving me a link to a good web page.
hmm my doubt in simple words

"what does JVM use to convert bytecode to machine language code i.e does it use any API that comes with JRE to convert byte code to machine language code ?"


According to fig shown in
http://java.sun.com/j2se/1.5.0/docs/index.html
we can say that

JRE = DEPLOYMENT TECHOLOGIES + USER INTERFACE TOOL KITS+ INTEGRATION LIBRARIES + UTIL AND LANG PACKAGES + JVM(OFCOURSE)

which of the above does JVM use to convert bytecode to machine understandable code.

sorry if i am not clear. i have question in my mind might be that i am not able to present it clearly.

Thank you
reddy
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I believe that the part you are looking for is inside the JVM itself. I don't know the details about how byte code is converted into machine code, and I suspect it is different for each platform that supports a JVM. On the other hand, I have taken courses in Theory of Computation and Compilers which explain the theory behind how this works, although these courses don't cover the specific details about how it works in the case of Java itself.

Layne
[ November 03, 2004: Message edited by: Layne Lund ]

Java API Documentation
The Java Tutorial
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JRE VS JVM
 
Similar Threads
JRE VS JVM
JVM implementation
Need Solid Explanation of Java.exe
what is the difeerence between jdk and jre?
JRE VS JVM