0% found this document useful (0 votes)
3 views11 pages

JDK

The document outlines the installation process for Java, including downloading and setting up the JDK, as well as compiling and executing a Java program. It explains the roles of the Java Compiler, Interpreter, JDK, JRE, and JVM in the Java development environment. Additionally, it provides a simple example of a Java program and the commands needed to compile and execute it.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

JDK

The document outlines the installation process for Java, including downloading and setting up the JDK, as well as compiling and executing a Java program. It explains the roles of the Java Compiler, Interpreter, JDK, JRE, and JVM in the Java development environment. Additionally, it provides a simple example of a Java program and the commands needed to compile and execute it.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

JAVA

JAVA INSTALLATION

Download JDK

Install JDK

Set Environmental
Variable
Compiling and Executing a Java
Program
JAVA Compiler and Interpreter
• 1. Compiler
The process of converting entire source code into byte code
that process is known as Java Compiler

It is set of program that contain set of instruction which is


implemented in c/c++ programming langauge.

java file Java Byte Code


Compiler
JAVA Compiler and Interpreter
• 1. Interpreter
The process of converting entire bytecode into native code that
process is known as Interpretation

Byte file Java Native Code


Interpreter
JDK, JRE, JIT
JDK

• JDK is an abbreviation for Java


Development Kit which includes all the
tools, executables, and binaries required to
compile, debug, and execute a Java
Program.

• JDK is responsible to provide environment


to develop and execute/run java
application.

• JDK is platform dependent i.e. there are


separate installers for Windows, Mac, and
Unix systems.

• JDK includes both JVM and JRE and is


entirely responsible for code execution.
JRE (JAVA RUNTIME ENVIRONMENT)

• Provide an environment just to run the java


code.

• JRE comprises mainly Java binaries and


other classes to execute the program like
JVM which physically exists.

• Inside JRE mainly the JVM is responsible to


execute th java code line by line.
JVM

• JVM is the abbreviation for Java Virtual


Machine which is a specification that
provides a runtime environment in which
Java byte code can be executed.

• JVM runs the java code line by line hence it


can be consider as a interpreter.

• The JVM performs the mentioned tasks:


Loads code, Verifies code, Executes code,
and Provides runtime environment.
First JAVA Program

import java.io.*; - Save the above code with


class Main { Main.java
public static void main(String args[]){ - Open Command prompt and
System.out.println("Hello Java"); compile and execute the code with
} below command
}
To compile:
javac Main.java
To execute:
java Main
THANK YOU

You might also like