1. Java Compiler (javac): Java compiler is responsible for
converting the Java program into Bytecode. Java compiler is written in C and
C++ for compiling the java source code.
Java source code is input
for the Java compiler and it creates .class file of the same name as input file with
.java extension. Once you compile the .java source file with javac command it is then converted to the
.class file by java compiler and such .class file containing the bytecode will
be used by JVM to execute the program.
So after creating the
.class file for a .java source file you do not need .java file to execute and
to get output as it has no role in generating the results. Everything written
in .java file will be converted in bytcode by compiler and then the bytecode
only will be used to generate desired results.
You can invoke java
compiler by calling a command at command prompt javac.
2. Java Interpreter
(java.exe): Java interpreter
is part of JVM and it converts the bytcode to the language which is understood
by the computers (machine Code). We can invoke the Java interpreter by the
typing the command java at command prompt. The java interpreter is also
implemented in native language like C or C++.
3. Java Virtual Machine
(JVM): JVM is a
process created in the main memory and which is responsible for executing the
java program using the bytecode produced by the Java Compiler. JVM provides
every resource that is required by the java bytcode to produce correct results.
4. Java Runtime
Environment (JRE): Java runtime environment is set of files and processes
which forms the JVM when loaded into the main memory. JRE consist of various
types of files and it provides support for running an Java application
5. Java Development
Kit/Software development Kit: Java development kit or software development kit is
set of associated files and programs used to create Java programs or
applications. JDK or SDK is provided by the vendor of programming language.
Previously JDK was provided by the parent company of Java SUN Micro. But it is
now being provided by Oracle corp. As Oracle Corp has undertaken the SUN Micro.
The
main editions of JDK or SDK are:
i.
EE: EE
stand for Enterprise Edition. This edition of JDK consists of files and set of
software which can be used to develop large enterprise applications or
distributed applications.
ii.
SE: SE stands for Software Edition. This edition of the
JDK consists of files and supporting software which can be used to develop
standalone applications or server applications or distributed applications.
iii.
ME: ME stands for Mobile Edition. This edition of JDK is
designed to provide support for mobile applications and applications for
smaller device like tablets, smart phones etc. We can develop applications
suitable for such devices using the mobile edition of JDK.
Till
now we have 7 versions of JDK. The current and latest version of JDK is called
as JAVA7. The previous versions are still in use but we will get more
sophisticated features in newer and latest versions.
6. Just-In-Time-Compiler
(JIT): Just in time compiler is
introduced to solve the performance problem caused by Java Interpreter. Java
Interpreter reads the code line by and line slows down the execution of the
program. To solve this problem JIT was introduced which does some code
optimization to increase the performance of the interpreter. The code which is
optimized is called as HotSpot. For this reason the virtual machine provided by
Oracle is called as HotSpot which optimizes these hotspots.
For ex. JIT
can store variables declared in final and static already in some memory so that
they will be accessed as it is in future whenever they are referred in program.
0 comments:
Post a Comment