Questions About The Java Compiler And Java Virtual Machine?

November 20th, 2009 Leave a reply »

1. What language are they written in? Are they written in C?
2. To make Java work on Macs, Linux, and Windows, is there a version of the VM written for each platform, or do only certain things change in the source code?

English Football

Related posts:

  1. How Do You Use Vmware To Use Ubuntu As A Virtual Machine On A Macbook? yes there is a version of vmware for macs and...
  2. Can I Install Yellow Dog Linux 5.0 As A Virtual Machine? I want to install Yellow Dog Linux as a virtual...
  3. How Can You Change Tthe Amount Of Memory Allocated To The Java Virtual Machine? …on a mac computer. ...
  4. Windows For A Virtual Machine? I am trying to set up windows on a virtual...
  5. What Is The Use Of Vmware Virtual Server? Can anyone explain in layman’s language why its used, advantages,...

Related posts brought to you by Yet Another Related Posts Plugin.

2 comments

  1. deonejua says:

    The JVM is written in C as a stack architecture ….
    “The aim is binary compatibility. Each particular host operating system needs its own implementation of the JVM and runtime. These JVMs interpret the byte code semantically the same way, but the actual implementation may be different. More complicated than just the emulation of bytecode is compatible and efficient implementation of the Java core API which has to be mapped to each host operating system.”
    The variance is not only for hardware compatibility but also to maximize the java API per platform.
    Other API can handshake the JVM such as JOGL to accomplish a thin layer programming OpenGL. C++ enters the picture here.
    To view JVM code requires registration with Sun.

  2. ♥Neeraj Yadav♥ says:

    1)Javac is the primary Java compiler, included in the Java Development Kit (JDK) from Sun Microsystems.
    The compiler accepts source code conforming to the Java language specification (JLS) and produces bytecode conforming to the Java Virtual Machine Specification (JVMS).
    javac is itself written in Java. The compiler can also be invoked programmatically.
    2)Answer one tells half of it..yet,The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode.Java can be both middleware and a platform in its own right — hence the trademark write once, run anywhere.
    The JVM runtime executes .class or .jar files, emulating the JVM instruction set by interpreting it, or using a just-in-time compiler (JIT) such as Sun’s HotSpot. JIT compiling, not interpreting, is used in most JVMs today to achieve greater speed.
    Hope you have heard these term “Instruction Set”?
    if not then..remember microcontroller/microprocessors?
    Like most virtual machines, the Java Virtual Machine has a stack-based architecture akin to a microcontroller/microprocessor.
    The JVM, which is the instance of the JRE (Java Runtime Environment), comes into action when a Java program is executed. When execution is complete, this instance is garbage-collected. JIT is the part of the JVM that is used to speed up the execution time. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.
    in short JVM acts like virtual machine by itself too..and the specifications are same in every platform(Linux/Mac/Windows)
    forth http://java.sun.com/docs/books/jvms/
    hope this resolves your issues
    Cheers:)

Leave a Reply

Powered by Yahoo! Answers