Difference between JDK and JRE
Key difference: JDK stands for Java Development Kit, which provides Java development components to the Java developers. JRE stands for Java Runtime or Runtime Environment Open JDK (Open Java Development Kit) is a part of JDK, and are known to provide software tools in an open implementation to the java developers.
include("ad4th.php"); ?>The JDK (Java Development Kit) is an oracle corporation product, which consists of all Java oriented programming components for Java developers. It is a former form of binary product aimed especially for Java developers, who actually operate on Solaris, Linux, Mac OS X or Windows. It was announced free by Sun on 17 November 2006, under the GNU General Public License (GPL). It became known and famous by its open source version, which was developed on 8 May 2007.
The JDK is a software development environment which is known to provide the developed Java programming facilities, such as 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. It is a program development environment for initializing the Java applets and its applications. It possesses the runtime components which lie on the top most of the operating system layers; also it is an essential tool for programming, developing, compiling, debugging and running the applets and applications written in the Java language. Initially, the java developers are provided with two types of JDK tools, they are: java and javac. Both run on the command prompt. The Java source executing files are simple text files, which are saved with a .java extension file format. After writing and saving the Java source code program, the javac compiler is invoked to create .class files. Once the .class files are created, the 'java' command can be further used to run the java program.
include("ad3rd.php"); ?>The JDK has a collection of primary programming tools and components, some of which includes:
- appletviewer – This tool can be used to run and debug Java applets without a web browser.
- apt – The annotation-processing tool.
- java – The loader for Java applications. This tool is an interpreter and can interpret the class files generated by the javac compiler.
- javac – The Java compiler, which converts source code into Java bytecode.
- javadoc – The documentation generator, which automatically generates documentation from source code comments.
- jar – The archiver, which packages related class libraries into a single JAR file. This tool also helps manage JAR files.
The JRE (Java Runtime Environment) also stands for Java Runtime, is a part of JDK. It is a set of programming tools and components which are essentially applicable in Java developing applications. It facilitates the minimum requirements for executing Java applications. It mainly comprises of the Java Virtual Machine (JVM), core classes, and supporting library files. Originally, it was developed by the Sun Microsystems Inc., as a wholly-owned subsidiary of Oracle Corporation.
The JRE (also be written as Java RTE), is applicable only in the installed Java Runtime Environment components and applications and Java applets. It is applicable for multiple computer platforms, including Mac, Windows, and UNIX. The JRE is condition oriented, that is if JRE is not installed on any computer, then it might happen that the Java programs may not be recognized by the respective computer operating system. The JRE Software provides a runtime environment in which Java programs can be executed. It is available in both the forms as, a standalone environment and a Web browser plug-in, which allows Java applets to run within a Web browser. The latest JRE 1.0 has evolved with variety of classes and packages; these are included in the core libraries and have grown from a few a few hundred classes to several thousand in Java 2 Platform, Standard Edition (J2SE).
The JRE includes various forms of deployment technologies, some of them are:
- Java Virtual Machine (JVM): These include Java HotSpot Client and Server Virtual Machines.
- User interface toolkits: These includes the Abstract Window Toolkit (AWT), Swing, Java 2D, Accessibility, Image I/O, Print Service, Sound, drag and drop (DnD) and input methods.
- Integration libraries: These include the Interface Definition Language (IDL), Java Database Connectivity (JDBC), Java Naming and Directory Interface (JNDI), Remote Method Invocation (RMI), Remote Method Invocation Over Internet Inter-Orb Protocol (RMI-IIOP) and scripting.
- Other base libraries: These include international support, input/output (I/O), extension mechanism, Beans, Java Management Extensions (JMX), Java Native Interface (JNI), Math, Networking, Override Mechanism, Security, Serialization and Java for XML Processing (XML JAXP).
- Lang and util base libraries: These includes, the lang and util, management, versioning, zip, instrument, reflection, Collections, Concurrency Utilities, Java Archive (JAR), Logging, Preferences API, Ref Objects and Regular Expressions.
Comparison between JDK and JRE:
|
JDK |
JRE |
Introduction |
The Java Development Kit (JDK) is an Oracle Corporation product aimed at Java developers. |
The Java Runtime Environment (JRE) is a free and open source implementation of the Java programming language. |
Stands for |
Java Development Kit. |
Java Runtime, Runtime Environment Open JDK (Open Java Development Kit) |
Roles |
JDK is meant for programmers. |
JRE is meant for users and it is to be installed. |
Contains |
JDK contains one (or more) JRE's. |
JRE is apart of JDK. |
Basic functions |
JDK is used to develop the Java program. |
JRE is enough to run the Java program. |
Required for the tasks such as |
If a program is to be compiled then JDK is required. |
If a program is to be executed then JRE is required. |
Set of components |
It contains JRE and development tools. |
It contains set of libraries and other files that JVM uses at runtime. |
Working |
By using the JDK the tools required for compiling Java source file, create into class files, i.e. javac, further compiles the files. |
By using JRE the Java programs can not be compiled. |
Image Courtesy: gustavofurtado.com, ibm.com
Add new comment