On a Java virtual machine implemented in software, the simplest kind of execution engine just interprets the bytecodes one at a time.
Another kind of execution engine, one that is faster but requires more memory, is a just-in-time compiler.
the bytecodes of a method are compiled to native machine code the first time the method is invoked. The native machine code for the method is then cached,
As the program runs, the virtual machine compiles to native and optimizes just these heavily used areas.
How Java Runs?
In Java, there are two kinds of methods: Java and native.
A Java method is written in the Java language, compiled to bytecodes, and stored in class files.
A native method is written in some other language, such as C, C++, or assembly
Java methods are platform independent, native methods are not.
Latest posts by Md Saddam Hussain (see all)
- How to Open Camera,Browser,Mail,Media in Android Example - December 24, 2016
- About Android !!!! - September 27, 2015
- File Editor In java with beautiful GUI - September 27, 2015