Java Virtual Machine Architecture|Java Virtual Machine Tutorial|Java Virtual Machine Launcher|Java Virtual Machine Specification

Java Virtual Machine
Table 2: Java Virtual Machine main options
java
Adds the path to the CLASSPATH value
-classpath path,
for this execution
-cp path
-verbose [:class—gc—jni] Output messages on classes/garbage
collection/java native interface to
show the effected operations
Gives the current version and exits
-version
Print help
-help, -?
Print non-standard options
-X
e.g. -Xmssize e.g. Set the initial heap size.
e.g. -Xsssize e.g. Set the thread stack size.
The Java Virtual Machines (JVM) are the execution environments for Java
programs (see Table 2). A JVM is intended to act as an interpreter for the byte
code. Thus the byte code is itself portable from one platform to another. Java
virtual machines have to be ported and installed on the respective platforms
prior to program execution.
By default, the argument class name will be loaded and the main method
within this class will be called as a starting point. The JVM takes care of
memory allocation and deallocation. In particular, the JVM manages automatic
garbage collection of instances and code when not used any more .
While interpretation is slow in general, a JVM has lots of facilities to speed
up execution. The most important one is Just-In-Time (JIT) compiling which
compiles the byte-code to native code when it is loaded, thus giving near native
performance on the use of a class once it has been executed at least once. Of
course this initial translation yields a performance penalty at first execution of
given method.
If MyMain is the class containing the bootstrap code, the program can be
launched as follows:
java MyMain

  © Free Blogger Templates Modic Template by For more Information : click Here

Back to TOP