aspose file tools*
The moose likes Beginning Java and the fly likes JVM implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JVM implementation" Watch "JVM implementation" New topic
Author

JVM implementation

nitinram agarwal
Ranch Hand

Joined: Jan 29, 2009
Posts: 83
I have a question on JVM. I have read some articles and books and my understanding is that the jdk consists of JRE and JVM and JVM mainly takes care of translating java codes to bytecode. However I would like to know who other than SUN Microsystem implements JVM and JDK. I can think of BEA also as one of the name. if you can provide some other names, it will be helpful
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
my understanding is that the jdk consists of JRE and JVM

JRE = JVM + class libraries
JDK = JRE + tools (like java, javac, jar, ...)

JVM mainly takes care of translating java codes to bytecode.

No. That's the job of the javac compiler (which is implemented in Java, so a JVM is needed to run it). The JVM translates bytecode to native code at runtime, though.

However I would like to know who other than SUN Microsystem implements JVM and JDK. I can think of BEA also as one of the name.

IBM has JVMs for all of their architectures. Apple has a JVM that is based on the Sun JVM, but adapted to work well on OS X.


Ping & DNS - my free Android networking tools app
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

nitinram agarwal wrote:I have read some articles and books and my understanding is that the jdk consists of JRE and JVM and JVM mainly takes care of translating java codes to bytecode.


This is not quite right. JVM is actually a logical thing which is implemented by JRE. JDK consists of JRE plus tools like compiler,debugger etc... Check JavaDocs for more information.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
Vijitha Kumara wrote:JVM is actually a logical thing which is implemented by JRE.

Just the other way around: The JVM is a part of the JRE. See my post above, and #18 in the http://faq.javaranch.com/java/JavaBeginnersFaq
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

Oops my Bad. Thanks Ulf, yes I was trying to say that the JRE is the software implementation of the JVM.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
I was trying to say that the JRE is the software implementation of the JVM.

It's not - the JVM is just part of the JRE. The class libraries are the other part.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

Yep. Thanks Ulf
nitinram agarwal
Ranch Hand

Joined: Jan 29, 2009
Posts: 83
thanks for the explaination on JVM. now another basic question. Is the JDK compiler being primarily designed by only SUN or there are other organisations developing this compiler as well
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
Each JDK has its own compiler, and I'd expect the compiler in the Sun JDK to be written by Sun. Of course, Sun is now open-sourcing the JDK, so people from all over the place may be contributing to it.

It's possible to use a different compiler, though. Jikes is a fast compiler written in C (originally by IBM, but now open source). You can use that instead of Sun's javac.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

And Eclipse's built-in Java compiler is of their own devising, as well.


[Jess in Action][AskingGoodQuestions]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14107
    
  16

Think of it like this: The JVM is just the engine that reads and executes bytecode. To get anywhere, you need more than just the engine. You need a complete car. The JRE is the car around the JVM.

Ernest Friedman-Hill wrote:And Eclipse's built-in Java compiler is of their own devising, as well.

Eclipse's built-in compiler is based on IBM's Jikes compiler. Eclipse was originally developed by IBM.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Jesper Young wrote:
Eclipse's built-in compiler is based on IBM's Jikes compiler. Eclipse was originally developed by IBM.


I don't actually know if the ECJ team and Jikes team had any members in common, but do note that ECJ is written in Java, and Jikes was written in C++. Any claim that the one is based on the other at anything more than a conceptual level is tenuous at best.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM implementation