Introduction to the Java Development Kit

In this section, you will discover the various acronyms and tools associated with the Java Development Kit. Make sure you understand them before moving on. Because these tools and acronyms will be used throughout this book.

What is the Java Development Kit (JDK)?

The Java Development Kit (JDK) is a software development environment used for developing Java applications. It includes the Java compiler, the Java Virtual Machine (JVM), the Java Runtime Environment (JRE), an archiver, a documentation generator known as Javadoc and other tools needed to develop programs in Java.

What is Java compiler?

The Java compiler is a tool which converts your input, also known as source code, into a machine language. This machine language is known as bytecode. The process of converting your source code to bytecodes is known as compilation. When you run your program, the Java Virtual Machine (JVM) interprets these bytecodes. You can run the Java compiler by typing javac on your console.

What is Java Virtual Machine (JVM)?

The Java Virtual Machine (JVM) is a software which runs your Java programs. The Java Virtual Machine (JVM) created by Sun Microsystems is known as HotSpot. It is currently owned by Oracle Corporation. This is the JVM most people use. But there are many other Java Virtual Machines available that satisfy various needs. You can run the Java Virtual Machine (JVM) by typing java on your console.

What is Java Runtime Environment (JRE)?

Java Runtime Environment (JRE) is a platform where your Java programs run. It includes the Java Virtual Machine (JVM) and the runtime libraries.

People new to Java are usually confused whether to use the JRE or the JDK. You can use the JRE to run Java applications. However, to develop Java applications and run them, you need to use JDK.

In other words, the Java Runtime Environment (JRE) is separate from the Java compiler. You don’t need the Java compiler to run your compiled programs.

What is Java Application Programming Interface (API)?

Java Application Programming Interface (API) is a list of all the classes that are part of the Java Development Kit (JDK). It includes all Java packages, classes, and interfaces, along with their methods, fields, and constructors.