Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM implementation

 
nitinram agarwal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops my Bad. Thanks Ulf, yes I was trying to say that the JRE is the software implementation of the JVM.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep. Thanks Ulf
 
nitinram agarwal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Eclipse's built-in Java compiler is of their own devising, as well.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic