Java Reference
In-Depth Information
The interpreter may monitor how often each bytecode instruction is executed and hand over the
frequently executed instructions (also called hot spots ) to the Just in Time (JIT) compiler, which is
also an environment-specific component. The JIT compiler will then compile the bytecode of these
hot spots into native, more efficient machine code so they can be executed by the JVM directly (just
in time) instead of having to interpret them. In this way, frequent code will be compiled and less fre-
quent code will be interpreted. The user can set the threshold to determine whether a piece of code
is considered frequent or not. This feature substantially improves the execution time of the program
at runtime, especially when it is executed multiple times. Although this is not recommended, the JIT
compiler option can also be turned off.
Java platforms
A Java platform or edition consists of a JRE with a specific set of libraries for a specific application
environment. Table 2-3 gives an overview of the most important Java platforms.
table 2-3: Java Platforms
pl atform
Key char acteristics
J2SE (Java 2 Platform, Standard
Edition)
Core Java platform designed for applications running on
desktop PCs
J2EE (Java 2 Platform, Enterprise
Edition)
Design, development, assembly, and deployment of busi-
ness applications
J2ME (Java 2 Platform, Micro
Edition)
Design of small, embedded applications in consumer
devices (such as mobile phones)
Java Card
Design of small Java applications that run on smart cards
JavaFX
Design of Rich Internet Applications (RIAs)
As discussed, this topic predominantly focuses on the J2SE platform.
Java applications
In this section, we will discuss various types of Java applications such as standalone applications,
Java applets, Java servlets, and Java beans.
Standalone applications
A standalone application is one that can run
on its own without needing to be embed-
ded in a particular host environment (such
as a web browser). Standalone applications
only need a JVM to execute. They can be
command-line applications or graphical user
interface (GUI) applications. A command-
line application uses the command prompt
for the input and output. This is illustrated in
Figure 2-6.
figure 2-6  
 
Search WWH ::




Custom Search