JDK :
Java development toolkit is called JDK.
JDK consists of a set of separate programs for developing and testing java program, each of which is invoked from a commend line.
Java development tools ( Net Beans, Eclipse, Text Pad, Jbuilder ).
JDK = JRE + Development Tools
JDK = JRE + Development Tools
Java run time environment (JRE) is intended for software developers and vendors to redistribute with their applications.
Runtime Environment contains the Java virtual machine, runtime class
libraries, and Java application launcher that are
necessary to run programs written in the Java programming language.
It is not a development environment and
does not contain development tools such as compilers or debuggers. For development tools , see the JDK.
JRE =
JVM + Class Library
-->Byte
code is
a highly optimized set of instructions designed to be executed by the Java
run-time system, which
is
called the Java Virtual Machine (JVM).
-->That
is, in its standard form, the JVM is an interpreter for byte code.-->Java byte code can be executed on any computer with a java virtual machine.
-->JVM execute the program by invoking the main method
(System.out.println statement)
JIT :
-->Just In Time compiler(JIT) is part of the JVM, it compiles byte code into executable code in real time, on a piece-by-piece, demand basis.
-->It is important to understand that it is not possible to compile an entire Java program into executable code all at once, because Java performs various run-time checks that can be done only at run time.
-->Instead, the JIT compiles code as it is needed, during execution.
Explain about main method:
Example:
class Test{
}
How to compile java program?
javac Test.java
java Test
RunTimeException : NoSuchMethodError.main
JIT :
-->Just In Time compiler(JIT) is part of the JVM, it compiles byte code into executable code in real time, on a piece-by-piece, demand basis.
-->It is important to understand that it is not possible to compile an entire Java program into executable code all at once, because Java performs various run-time checks that can be done only at run time.
-->Instead, the JIT compiles code as it is needed, during execution.
Explain about main method:
Example:
class Test{
}
How to compile java program?
javac Test.java
java Test
RunTimeException : NoSuchMethodError.main
-->Whether
class contains main() method or not and whether main() method is declared
according to requirement or not these things won’t be checked by compiler. At
runtime, JVM is responsible to check these things.
-->At runtime if JVM is unable to find required main() method then we will get runtime exception saying.
NoSuchMethodError.main
-->At runtime if JVM is unable to find required main() method then we will get runtime exception saying.
NoSuchMethodError.main
No comments:
Post a Comment