<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Java Info</title>
<style>
body {background-color: powderblue;}
h2 { color: #7c795d; font-family: 'Source Sans Pro', sans-serif; font-size: 28px; font-weight: 400; line-height: 32px; margin: 0 0 24px; }
</style>
</head>
<body>
<p>
The Java platform is composed of
1. Compiler – It generate bytecode from source code - Bytecode is binary code that Java platform interpret
2. Java Virtual Machine – It provide runtime execution environment for bytecode.
3. Libraries – It contain Java API.
4. Tools – Various Java Tools.
</p><p>
The Java bytecode has two important characteristics
1. It is processor independent i.e. the program can run on any processor architecture.
2. It is Operating System independent i.e. bytecode doesn't target any Operating System such as Windows or Linux.
</p><p>
The Java platform is available in four flavors based upon device type.
1. Java Card – It is used in smart cards and small memory devices.
2. Java ME (Micro Edition) – It is used in Personnel Digital Assistants, Setup Box and
printers application.
3. Java SE (Standard Edition) – It is used in development of desktop, communication
and User Interface based applications.
4. Java EE (Enterprise Edition) – It is used in development of web based, messaging,
distributed and enterprise applications.
</p><p>
Java as Programming Language
1.Statically typed – The type of the variable is known at compile time.
2. Object-oriented – Object centered programming.
3. Concurrent – Support for multithreading programming.
</p>
<p>
<h3> Java Runtime Engine (JRE)</h3>
<ol>
<li>The minimum environment required for a java program to run/execute is called JRE </li>
<li>JRE cannot be used for development of Java application but it is used for executing them.</li>
<li>JRE is composed of following components:</li>
<ol>1.Interpreter: It understand binary java code (e.g.: java.exe).</ol>
<ol>2.Tools: They provide various functionality such as security, core services,
internationalization, RMI etc.(e.g.: keytool, rmiregistry, javacpl etc)
</ol>
<ol>3.Library: Java Application Programming Interface (rt.jar, jce.jar, jsse.jar etc.)</ol>
</ol>
</p>
<p>
<h3>Java Development Kit (JDK)</h3>
<div>JDK is a super set of JRE. JDK has all the components that JRE has plus it has a compiler.
</div>
<ol>
<li>JDK is nothing but Java Standard Edition which is used for development of java application</li>
<li> JDK is composed of following components:</li>
<ul>
<li>Compiler: It is used to compile java code to bytecode (e.g Javac.exe).</li>
<li>Interpreter: It processes bytecode to native code (e.g. java.exe).</li>
<li>Library: Reusable pre-defined Java API (rt.jar, jce.jar, jsse.jar etc.)</li>
</ul>
</ol>
</p>
<p>
<h3>What is PATH variable? </h3>
<ol>
<li>Environment variables are special Windows OS variables that are dynamic in nature.</li>
<li>The value of environment variable is changeable and updateable therefore environment variable is
called as dynamic.</li>
<li>They contain values that can be used by programs. Environment variables are used for identify
installation directory, location of temporary files, tools and profile settings</li>
<li>Path environment variable identifies the location of Java compiler and Java interpreter.</li>
<li>The “PATH” variable contain the location of tools, specifically it identifies the location of
java interpreter (Java.exe), Java compiler (Javac.exe) and Java tool chain.</li>
<li>“SET” command provide a complete list of all environment variables from command line.
</li>
<li>Control panel technique is better than command line because it is permanent.</li>
<li>“SET” followed by environment variable will show value for that variable only.</li> </ol> </br>
<li>PATH variable can be set in two ways using</li>
<ol>
<li>Command Line Setting</li>
<div>This technique will apply only for the current command line session.</div>
<div>The PATH variable can be set using SET command. The SET command is not case sensitive.</div>
<div>Set path= “C:\Program Files\Java\jdk1.8.0_65\bin”</div>
<div>Explanation: The above command will overwrite the PATH variable with the location of
JDK 1.8.Use double quotes for directory that contain space. When setting PATH variable
do not specify the name of tool only identify the location.</div>
<div>Set PATH = %path%; “C:\Program Files\Java\jdk1.8.0_65\bin”
Explanation: The above command will append the location of PATH variable.</div>
</br>
<li>Setting PATH Using Control Pane- This is a superior way of setting PATH variable because it will be permanent.
<ol>
<li>Start control panel -> Choose System applet.</li>
<li> Click Advanced System Settings.</li>
<li>. Choose advanced tab from environment variables dialog box.</li>
<li> Click on Environment variables button.</li>
<li> Goto Path variable in System Variables container and edit values to it.</li>
<li> If PATH variable is not available then create a new PATH variable and add value to
it.</li>
</li>
</ol>
</ol>
</p>
</body>
</html>