Jdk architecture in java

What is a Java Development Kit (JDK)? Why Do We Need It?

What Is JDK in Java? Why Do We Need It?

JDK in Java is an essential component necessary for software development. It is technically an implementation of either Java Standard Edition or Java Enterprise Edition. We will learn about the JDK in Java in a more detailed way through the following docket.

What Is JDK in Java?

JDK in Java is an abbreviation for Java Development Kit. It is a bundle of software development tools and supporting libraries combined with the Java Runtime Environment (JRE) and Java Virtual Machine (JVM).

Programmers familiar with Java might have the following common question.

To run Java Programs, just the Java Run-time Environment would be enough, but why the complete JDK?

Читайте также:  Найти сумму элементов побочной диагонали матрицы питон

The answer is comparatively simple. Unlike typical Java programs, the real-time Java applications require complex software toolkits and libraries available only in JDK.

In the next segment, we will learn the architecture of JDK in Java.

The Architecture of JDK in Java

The architecture of JDK in Java includes the following modules as described in the image below.

Java-The-architecture-of-JDK-in-Java

The three vital software modules of JDK are:

Basics to Advanced — Learn It All!

JVM (Java Virtual Machine)

Java Virtual Machine is a software tool responsible for creating a run-time environment for the Java source code to run. The very powerful feature of Java, «Write once and run anywhere,» is made possible by JVM.

The JVM stays right on top of the host operating system and converts the java source code into ByteCode (machine language), and executes the program.

JDK (Java Development Kit)

We can define the Java Development Kit as a software development environment responsible for creating a run-time environment for the Java source code to run.

JRE (Java Run-time Environment)

Java Run-time Environment is a software platform where all the Java Source codes are executed. JRE is responsible for integrating the software plugins, jar files, and support libraries necessary for the source code to run.

We have explored the architecture of JDK in Java, and now we will move ahead and learn more about the components of JDK in Java.

Components of JDK in Java

The fundamental components of JDK in Java are listed below.

java

It acts as the deployment launcher in the older SUN java. It loads the class files and interprets the source code compiled by the javac compiler.

javac

The javac specifies the java compiler to convert the source code into bytecode.

Basics to Advanced — Learn It All!

javadoc

The javadoc generates documentation for the comments added in the source code.

jar

The jar helps the archives to manage the jar files in the package library.

jps

The jps stands for Java Virtual Machine Process Status Tool. It manages the active JVMs for the currently executing program.

appletviewer

The appletviewer is designed to run and debug Java applets without the help of an internet browser.

idlj

An IDL-to-Java compiler generates Java bindings from a given Java IDL file.

javap

The javap acts as a file disassembler.

JConsole

JConsole acts as a Java Management and Monitoring unit.

javah

The javah is a stub-generator, and C-Header is employed to write native methods.

javaws

The javaws acts as the Web Start launcher for JNLP applications.

jhat

The jhat is a heap analysis tool.

jmc

The jmc stands as an abbreviation for Java Mission Control.

Now that we know the vital components of JDK, let us move ahead and understand the various latest JDK versions available currently for Java.

Latest Version of JDK in Java

The oracle corporations own the current Java, and now it is commercially available. Yet, there is still a free java version available, which is called OpenJDK.

The current Java JDK version from Oracle corporation is the JDK 14. The following are the features of Oracle JDK 14.

  1. Text blocks
  2. Pattern Matching for instanceof
  3. Helpful NullPointerExceptions
  4. Records
  5. Packaging Tool
  6. NUMA-Aware Memory Allocation for G1

Moving ahead, we will learn the steps to install Java into your local computer system.

Getting started with JDK in Java

Getting Started with Java is easy. We have to follow the steps mentioned below.

  1. Windows Vista, 7, 8, and above or Linux Operating System
  2. 128 MB and above Space on the RAM
  3. 128 MB and above Space on the ROM
  4. Internet Browser

Steps to download and install Java

  1. Navigate to the official website of Java
  2. Create an Oracle Account
  3. Download the latest version of JDK
  4. Setup the environment for Java
  5. Verify Java Installation

With that, we have come to the end of this article based on the JDK in Java.

If you’re eager to gain the skills required to work in a challenging, rewarding, and dynamic IT role — we’ve got your back! Discover the endless opportunities through this innovative Post Graduate Program in Full Stack Web Development course designed by our partners at Caltech CTME. Enroll today!

Next Steps

Java Programming can be your next stop as they are essential to go through, before you start coding. It helps you master how to get started with Java Fundamentals.

If you wish to have in-depth knowledge about the Java programming language and details on getting certified as an Expert Java developer, feel free to explore Simplilearn’s certification program.

If you have any queries about this «JDK in Java» article, feel free to leave them to us in the comments section, and our team of experts will answer them for you at the earliest!

Find our Full Stack Java Developer Online Bootcamp in top cities:

Name Date Place
Full Stack Java Developer Cohort starts on 4th Aug 2023,
Weekend batch
Your City View Details
Full Stack Java Developer Cohort starts on 25th Aug 2023,
Weekend batch
Your City View Details

About the Author

Kartik Menon

Kartik is an experienced content strategist and an accomplished technology marketing specialist passionate about designing engaging user experiences with integrated marketing and communication solutions.

Источник

JDK (Java Development Kit)

JDK (Java Development Kit) is a superset of JRE (Java Runtime Environment), it contains everything that JRE has along with development tools such as compiler, debugger, etc.

JDK Java development Kit

JRE (Java Runtime Environment)

JRE (Java Runtime Environment) provides the environment in which the JVM (Java Virtual Machine) runs. JRE contains JVM, class libraries, and other files excluding development tools such as compiler and debugger.

It means, you can run the code in JRE but you can’t develop and compile the code in JRE.

JDK and JRE Formulae

JVM (Java Virtual Machine)

JVM (Java Virtual Machine) runs the program by using class, libraries, and files provided by JRE. JVM able to run a program written in Java and other languages also that are compiled to Java byte code. For Example Jython, Jruby, Closure, Apache, Groovy, Kotlin, etc.

JVM Architecture

Now discussed terminology used for JVM.

Class Loader

The class loader reads the .class file and saves the byte code in the method area.

Method Area

Method area holds class level information of .class file. JVM jave only one method area which is shared among all the classes.

Heap

Heap is a JVM memory part where objects are allocated. JVM creates an object for each .class Class file.

Stack

The stack is JVM memory part but unlike Heap, it is used for storing temporary variables i.e method parameters.

PC Registers

PC Registers use to keeps the track of which instruction has been executed and which one is going to be executed. Because instructions are executed by threads, each thread has a separate PC register.

JIT Compiler

The JIT also called a Just-In-Time compiler. It used when a method is called. The JIT compiles the bytecode of that called method into native machine code. When a method has been compiled in native machine code, the JVM calls the compiled code of that method directly instead of interpreting it.

Native Method Stack

A native method used to access the runtime data areas of the virtual machine.

Native Method interface

It enables java code to call or be called by native applications wiritten in C or C++. Native applications are programs in low-level language that is specific to the hardware and OS of a system.

Garbage collection

Garbage Collection use for automatic memory management by JVM. It destroys unreferenced objects from Heap so that allocates more memory for new objects.

JDK Architecture & API’s Details

In this figure, you will get an idea of how these libraries and API’s are distributed on different levels.

JDK APIs Architecture

Difference between API and Methods

API (Application Programming Interface) interfaces that the rest of the world sees and can use. A Method can be part of the public interface or not. But an API executes a set of methods.

In java, APIs provide through the interface which is really a set of public methods. An API has contract like tells about method signatures and return type.

For Example List API’s provide different method signature and expected result as return type so that you can use according to your convenience.

Difference between JDK and SDK

JDK(Java Development Kit) is an extended subset of a SDK (Software Development Kit).

  • JDK includes tools for developing, debugging and monitoring of Java Program. It mainly responsible for the writing and running of Java programs.
  • SDK is composed of extra software related to a Web application or mobile application etc. such as Application Server, Documentation, Debuggers, Code Samples, Tutorials, GlassFish server, MySQL and IDE Netbeans.

Now, Oracle strongly suggests using the term JDK to refer to the Java SE Development Kit. The Java EE SDK is now available with or without the JDK, by which they specifically mean the Java SE 7 JDK.

Share this with others:

Источник

Оцените статью