Java Development Tools(JDK) , Java Runtime Environment(JRE) and Java Virtual Machine(JVM).

Java development kit

  1. What is this

  2. Who and Why use this

  3. includes


What is this 

The JDK is the development platform for building Java applications. And in other word it is a full featured software development kit.


Who and why use this

Java developers 

To develop java application


Includes

JRE (java runtime environment)

Development tools


        Development tools

  • Basic Tools (appletviewer, extcheck, jar, java, javac, javadoc, javah, javap, jdb, jdeps)
  • Security Tools (keytool, jarsigner, policytool, kinit, klist, ktab)
  • Java Web Services Tools (schemagen, wsgen, wsimport, xjc)

        Basic Tools

  1. Javac = javac is the compiler for the Java programming language; it's used to compile .java file. It creates a class file which can be run by using java command

  2. Appletviewer = appletviewer run and debug applets without a web browser, its standalone command-line program to run Java applets.

  3. Javadoc = JavaDoc is an API documentation generator for the Java language, which generates documentation in HTML format from Java source code.

  4. Jdb = the java debugger


Java runtime environment 

This physically exists and platform dependent. 



  1. What is this

  2. Who and why use this?

  3. Includes?



What is this

Is an installation package which provides an environment to run java programs and apps.


Who and why use this?

customers (end users) & developers.

To run java programs and applications (help in jvm)


Includes

JVM + library files & compiled class files.


           Development tools

            The JRE also contains toolkits designed to help developers improve their user                        interface. Some of these toolkits include:

  • Java 2D: An Application Programming Interface (API) used for drawing two-dimensional graphics in Java language. Developers can create rich user interfaces, special effects, games, and animations.

  • Abstract Window Toolkit (AWT): A GUI (Graphical User Interface) used to create objects, buttons, scroll bars, and windows.

  • Swing: Another lightweight GUI that uses a rich set of widgets to offer flexible, user-friendly customizations.

Java virtual machine 

  1. What is this

  2. Who and why use this

  3. How work this.


What is this

Is a virtual machine.


Who and why use this

End users(customers)

To provide an environment to run bytecode.



How work this



1) Classloader

Classloader is a subsystem of JVM which is used to load class files. Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java.

2) Class(Method) Area

Class(Method) Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods.

3) Heap

It is the runtime data area in which objects are allocated.

4) Stack

Java Stack stores frames. It holds local variables and partial results, and plays a part in method invocation and return.Each thread has a private JVM stack, created at the same time as thread.

A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes.

5) Program Counter Register

PC (program counter) register contains the address of the Java virtual machine instruction currently being executed.

6) Native Method Stack

It contains all the native methods used in the application.

7) Execution Engine

It contains:

  1. A virtual
  2. processorInterpreter: Read bytecode stream then execute the instructions.
  3. Just-In-Time(JIT) compiler: It is used to improve the performance. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. Here, the term "compiler" refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.

8) Java Native Interface

Java Native Interface (JNI) is a framework which provides an interface to communicate with another application written in another language like C, C++, Assembly etc. Java uses JNI framework to send output to the Console or interact with OS libraries.

 Thankyou..