• Post Reply Bookmark Topic Watch Topic
  • New Topic

JIT compiler  RSS feed

 
Rajiv Rai
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is JIT compilation? and how is it different from normal "javac" complier..
Also in what scenario should JIT be used ?

Thanks
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JIT stands for "Just In Time".

Java source code is compiled to bytecode. The CPU in your computer cannot execute that bytecode directly - it has to be translated into native machine code first. That's what the JVM does when it runs your Java program. The JIT compiles Java bytecode into native machine code.

Wikipedia has an extensive article about just-in-time compilation.

You don't have to do anything to use the JIT compiler - it's a standard part of the JVM.
 
Rajiv Rai
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So , is the standard java compiler "javac" which is
contained in the bin directory of the JDK installation
a JIT compiler as well or its a separate executable available somewhere
in the JDK installation?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's part of the JVM that you use to run Java applications, it's not a separate executable or DLL.
 
Campbell Ritchie
Marshal
Posts: 55759
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It only operates at runtime, being called by the java tool. No, it is not part of the javac tool.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!