• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM implementation

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep. Thanks Ulf
 
nitinram agarwal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And Eclipse's built-in Java compiler is of their own devising, as well.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic