top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Difference between JIT and JVM?

+2 votes
77 views

Is the intermediate code prepared by one used by another?

posted Aug 14, 2014 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

JVM (Java Virtual Machine)


Java program execution uses a combination of compilation and interpretation. Programs written in Java are compiled into machine language, but it is a machine language for a computer that is, virtual and doesn't really exist. This so-called "virtual" computer is known as the Java virtual machine (JVM). The machine language for the Java virtual machine is called Java bytecode.

Java Virtual Machine is a program that runs pre compiled Java programs, which mean JVM executes .class files (byte-code) and produces output. The JVM is written for each platform supported by Java included in the Java Runtime Environment (JRE). The Oracle JVM is written in the C programming language. There are many JVM implementations developed by different organizations. They may somewhat differ in performance, reliability, speed and so. They can too differ in implementation especially in those features where Java specification does not mention implementation details of the feature. Garbage collection is the nice example which is left on vendor's choice and Java specification does not provide any implementation details.

JIT Compiler (Just-In-Time Compiler)


The Just-In-Time (JIT) compiler is a component of the Java Runtime Environment (JRE). It improves the performance of Java applications by compiling bytecodes to native machine code at run time. When a Java program is run JVM launched that interprets the byte code and provides result. At run time, the JVM loads the class files, determines the semantics of each individual bytecode, and performs the appropriate computation. In this process, the JIT compiler helps improve the performance of Java programs by compiling bytecodes into native machine code at run time.

answer Aug 16, 2014 by Amit Kumar Pandey
Similar Questions
0 votes

There is a Java Virtual Machine completely implemented in Java called JPF. In other words, when you run a Java program within this machine, it's a JVM-within-a-JVM execution. Obviously, this uses a lot of resources and I was thinking of ways how that could be reduced.

An idea I have is to compile JPF with GCJ to native code, thereby resulting in only one JVM that is used when running a Java program within JPF.

Do you see any inherent limitations to this idea, i.e. reasons why it wouldn't work? I'm not a JVM expert so it's hard for me to see any obvious obstacles.

+2 votes

I am updating the Tomcat JVM configuration to enable java assertions as below:

a. Once tomcat server is configured in local eclipse,I pressed F3 on it.
b. Click on Open launch configuration link.
c. Go to Arguments tab.
d. Add -ea at the beginning of JVM arguments.

Then Finally I restarted my tomcat. Here is what I am getting....

 Server Tomcat v7.0 Server at localhost failed to start.
 Error: Could not find or load main class -ea

Any suggestions...

+1 vote

For lack of funds initially and now for a stalemate in the project, we do not have a JVM monitoring tool yet. JavaMelody was recently discussed. I like the fact that there is a dashboard and history of metrics. In looking at it, I find JavaMelody lacking in in-depth diagnostics of the JVM. Top-N SQL statements, Transaction Tracing, metrics co-relation, call-back tree, thresholds and alerting are a few.

Are there are any OpenSource projects that instrument the JVM at byte-code and provide detailed metrics more than what JMX offers? Or am I missing something with JavaMelody?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...