Wednesday, 29 April 2015

Understanding the directory structure of JDK (Java SDK)

In this artical ,We will discuss about the directory structure of JDK(Java Development kit) .

Generally JRE(Java Runtime Environment) is installed with JDK so here we are discussing about the both of JDK and JRE directory and file structure. The file structure of JRE is identical to that of the JDK's JRE directory.

General files and Directories



In case if you do not set PATH environment variable to executable files location.You will get below error message on command prompt.

C:\javac
 
Error message:  'javac' is not recognized as an internal or external command,
operable program or batch file.

Now the explanation of the above structure is as follows:-

Let's suppose the JDK software is installed at C:\Program Files\Java\jdk1.7.0_75

C:\Program Files\Java\jdk1.7.0_75:-It is the root/home directory of JDK installation. It contains the Copyright, license, README files, src.zip,and the archive of source code for the Java platform.

C:\Program Files\Java\jdk1.7.0_75\bin:-bin contains the executable (.exe) files for the development tools. This directory should contain by the PATH Environment Variables.

C:\Program Files\Java\jdk1.7.0_75\lib:-The development tools used these files. In this'toos.jar', which contains non-core classes for support of the tools and utilities in the jdk and 'dt.jar'(DesignTime archive of Bean Info) files which tell interactive development environments(IDE'S) how to display java components and how to let the developer customize them for an application, are included.

C:\Program Files\Java\jdk1.7.0_75\jre:-It is the root/home directory of the Java Runtime Environment. it is used by the JDK development tools. The JRE helps to run applets and applications written in the Java programming language by providing the libraries, JVM, and other components.

C:\Program Files\Java\jdk1.7.0_75\jre\bin:-It contains the Executable files and DLLs for the tools and Java platform. The executable files available in \jdk1.7.0_75\jre\bin are identical to the file available in \jdk1.7.0_75\bin. There is no need to be a path of this directory in Environment Variables.
In case of only JRE installed. This directory should contain by the PATH environment variable.

C:\Program Files\Java\jdk1.7.0_75\jre\bin\client:-This directory contains the DLLs files which are used by Java HotSpot Client Virtual Machine.

C:\Program Files\Java\jdk1.7.0_75\jre\bin\server:- This directory contains the DLLs files which are used by Java HotSpot Server Virtual Machines.

C:\Program Files\Java\jdk1.7.0_75\jre\lib:-It contains the Code libraries, property settings, and resource files which are used by the Java runtime environment.
For example:-
  1. rt.jar:-The bootstrap classes (these are the Runtime classes that comprise the Java platform's core API).
  2. charsets.jar:- These are Character conversion classes.

C:\Program Files\Java\jdk1.7.0_75\jre\lib\ext:-It contains extensions of default installation directory for the Java platform.
for example:-
localedata.jar:-locale data for java. text and java.util.

C:\Program Files\Java\jdk1.7.0_75\jre\lib\security:-It contains the files which are used for security management. These includes the security policy (java.policy) and security properties (java. security) files.

C:\Program Files\Java\jdk1.7.0_75\jre\lib\applet:-Applets can be placed in this directory by the supporting classes which are contained by jar files.

C:\Program Files\Java\jdk1.7.0_75\jre\lib\font:-It contains the font files (TrueType) used by the Java platform.


1 comment: