JAVA DEVELOPMENT KIT
The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (Java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc) and other tools needed in Java development.
JRE
JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses at runtime.
Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.
JVM
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. It is a
- Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is created.
The JVM performs following main tasks:
- Loads code
- Verifies code
- Executes code
- Provides runtime environment
Differences:
- JDK – Java Development Kit (in short JDK) is Kit which provides the environment to develop and execute(run) the Java program. JDK is a kit(or package) which includes two things
- Development Tools(to provide an environment to develop your java programs)
- JRE (to execute your java program).
Note : JDK is only used by Java Developers. - JRE – Java Runtime Environment (to say JRE) is an installation package which provides environment to only run(not develop) the java program(or application)onto your machine. JRE is only used by them who only wants to run the Java Programs i.e. end users of your system.
- JVM – Java Virtual machine(JVM) is a very important part of both JDK and JRE because it is contained or inbuilt in both. Whatever Java program you run using JRE or JDK goes into JVM and JVM is responsible for executing the java program line by line hence it is also known as interpreter.
The following actions occur at runtime.
- Class Loader
- Byte Code Verifier
The Class Loader loads all necessary classes needed for the execution of a program. It provides security by separating the namespaces of the local file system from that imported through the network. These files are loaded either from a hard disk, a network or from other sources.
The JVM puts the code through the Byte Code Verifier that checks the format and checks for an illegal code. Illegal code, for example, is code that violates access rights on objects or violates the implementation of pointers.
The Byte Code verifier ensures that the code adheres to the JVM specification and does not violate system integrity.
- Intrepreter
- Execute the Byte Code
- Make appropriate calls to the underlying hardware
At runtime the Byte Code is loaded, checked and run by the interpreter. The interpreter has the following two functions:
Comments
Post a Comment