Tutorial Playlist
In the early 1990s, under the leadership of James Gosling (a Canadian computer scientist), a group of developers at Sun Microsystems began developing a novel programming language called "Oak." Oak was designed for embedded systems, which initially encompassed consumer electronics. However, as the days passed, Sun Microsystems realized that Oak had a higher calling.
Sun Microsystems formally renamed the language "Oak" to Java, as the name Oak was already owned by another company.
The Java Development Kit, or JDK in Java, is a set of tools and libraries that programmers use to create Java-based applets, and that’s why it is called a Development Kit.
We will examine JDK in this tutorial. You will learn about the JDK composition and architecture and how to install it on your system. Read on to learn more.
The JDK was initially released on January 23, 1996.
The JVM and JRE are responsible for executing and running Java programs, and the JDK supplies the necessary tools. If you are new to Java, then you might get the Java Runtime Environment (JRE), the Java Development Kit (JDK), and the Java Virtual Machine(JVM) mixed up.
JDK full form in Java is Java Development Kit. It contains the JRE, an amalgamation of the JVM and libraries. It also contains the Java developer tools, i.e., javac, javadoc, and the Java debugger.
JDK is used to develop Java applications and create executable programs using the Java programming language. The architecture of JDK is designed to support the Java programming language. The JDK includes the following components:
You'd know what layers are if you've read a bit about operating systems. So, what is JRE?
JRE or Java Runtime Environment is a software layer that provides the essential libraries and resources a Java Program requires. It runs on top of your machine's OS (Operating System).
The JRE is responsible for combining the Java code created by the JDK with the libraries required to run the program and then creates an instance of the JVM, where the program executes.
Java Virtual Machine or JVM is, just as the name suggests, a virtual or abstract machine that enables users to run their Java applications. Java programs or applications have a trait called WORA or ‘Write Once Run Anywhere.’ So you can write a program on your system, then send it to another system where Java is enabled and expect it to run there.
When you write a program in Java, the source code is automatically saved as a file with a ‘.java’ extension. When you compile this code, the computer uses the Java compiler to convert this ‘.java’ file into a ‘.class’ file, which is machine-readable bytecode.
This ‘.class’ file is processed through an array of steps when we execute it, which is what the JVM enables.
The JDK contains a wide variety of tools, each having its own unique feature. These tools are mentioned down below:
Tool | Description |
java | Java interpreter or loader |
javac | Java compiler used to compile Java source code into bytecode. |
javadoc | Java documentation generator used to generate documentation from Java source code. |
jar | Java archive tool used to package Java applications and libraries into a single file. |
jps | Java process status tool used to list the Java processes running on a system. |
appletviewer | Tool used to view Java applets. |
idlj | IDL-to-Java compiler is used to generate Java code from CORBA Interface Definition Language (IDL) files. |
javap | Java class file disassembler used to display the contents of Java class files. |
JConsole | Java monitoring and management console used to monitor and manage Java applications. |
javah | Java header file generator used to generate C header files from Java classes. |
javaws | Java web start tool used to launch Java applications from the web. |
jhat | Java heap analysis tool used to analyze heap dumps generated by Java applications. |
jmc | Java mission control tool used to monitor and manage Java applications. |
The JDK in Java contains a wide variety of tools. The main components of JDK are mentioned below:
Java Development Kits have come a long way since its first release. However, some versions are used more than the others. Here are the most popular JDKs:
Release Year: 2014
It is a Java version with long-term support (LTS) that remains widely used today. It includes features like the Stream API, lambda expressions, and the Date-Time API.
Release Year: 2018
JDK 11 is also an LTS version of Java. It introduced new features such as the HttpClient API, the VarHandle API, and improvements to the garbage collector.
Release Year: 2020
JDK 14 introduced features such as switch expressions, NIO2 enhancements, and the new packaging tool ‘jpackage’.
Release Year: 2020
JDK 15 introduced features such as sealed classes, hidden classes, and improvements to the garbage collector.
Release Year: 2021
Features such as record classes, pattern matching for instanceof, and enhancements to the garbage collector were among the new additions this release included.
Coming to setting up JDK on your system, you need to adhere to the following steps to ensure that JDK is successfully installed and runs on your machine without any hindrance:
To set the JAVA_HOME environment variable, follow the steps mentioned below:
You have now successfully set the JAVA_HOME variable for your Windows system.
To compile and run code using JDK, follow the steps below:
Let’s say you have a Java-based application created on your system and want to share it with your fellow developers. You would want to compress the files to save on storage. To do this, you must create a “.jar” file containing all the files in your Java-based application. Follow the steps below to create a “.jar” file:
JDK 20, the most recent release, was circulated on March 21, 2023. JDK 20 was released as a “patch release,” while JDK 17 is the current Long Term Support (LTS) release.
JDK 20 comes with a lot of new features and improvements, such as:
The most credible source to start using JDK is the official JDK documentation. Understanding the elements of a Java program is easier when you have the documentation by your side.
You can start by creating your first class and typing the source code in a “.txt” file. Rename the file extension as “.java” from “.txt” and then use JDK from the command prompt to compile and execute your Java program.
The JDK in Java was one of their best and long-lasting creations of all time. JDK is still widely used by the IT industry, especially JDK 8. JDK provides many tools to compile, run, test, and debug Java applications. Creating Java applications without the JDK would be extremely difficult, so it is still being worked on and updated with new features at every single release.
1. What is JDK and JRE?
is Java Development Kit, while JRE stands for Java Runtime Environment. They both necessitate the development of Java-based applications along with the JVM(Java Virtual Machine).
2. Is JDK only available for Windows?
JDK is available for Windows, Mac, and Linux. You can go to the downloads page and download the installer suitable for your Operating System.
3. What is the difference between JDK, JRE, and JVM?
The JDK is a set of tools for creating a complete Java-based application, while the JRE lets you execute Java code correctly. JVM is a virtual machine that enables you to run the code on your system.
PAVAN VADAPALLI
Popular
Talk to our experts. We’re available 24/7.
Indian Nationals
1800 210 2020
Foreign Nationals
+918045604032
upGrad does not grant credit; credits are granted, accepted or transferred at the sole discretion of the relevant educational institution offering the diploma or degree. We advise you to enquire further regarding the suitability of this program for your academic, professional requirements and job prospects before enrolling. upGrad does not make any representations regarding the recognition or equivalence of the credits or credentials awarded, unless otherwise expressly stated. Success depends on individual qualifications, experience, and efforts in seeking employment.
upGrad does not grant credit; credits are granted, accepted or transferred at the sole discretion of the relevant educational institution offering the diploma or degree. We advise you to enquire further regarding the suitability of this program for your academic, professional requirements and job prospects before enr...