This chapter introduces the JDK directories and the files they contain. The file structure of the JRE is identical to the structure of the jre
directory in the JDK.
This chapter covers the following topics:
Demos and samples that show you how to program for the Java platform are available as a separate download at Java Downloads.
This section describes the most important files and directories required to develop applications for the Java platform. Some of the directories that are not required include Java source code and C header files. See Additional Files and Directories.
jdk-1.8 bin java* javac* javap* javah* javadoc* lib tools.jar dt.jar jre bin java* lib applet ext jfxrt.jar localdata.jar fonts security sparc server client rt.jar charsets.jar
Assuming the JDK software is installed at /jdk-1.8
, here are some of the most important directories:
Root directory of the JDK software installation. Contains copyright, license, and README files. Also contains src.zip
, the archive of source code for the Java platform.
Executables for all the development tools contained in the JDK. The PATH
environment variable should contain an entry for this directory.
Files used by the development tools. Includes tools.jar
, which contains non-core classes for support of the tools and utilities in the JDK. Also includes dt.jar
, the DesignTime
archive of BeanInfo
files that tell interactive development environments (IDEs) how to display the Java components and how to let the developer customize them for an application.
Root directory of the Java Runtime Environment (JRE) used by the JDK development tools. The runtime environment is an implementation of the Java platform. This is the directory referred to by the java.home
system property.
Executable files for tools and libraries used by the Java platform. The executable files are identical to files in /jdk-1.8/bin
. The java launcher tool serves as an application launcher. This directory does not need to be in the PATH
environment variable.
Code libraries, property settings, and resource files used by the JRE. For example rt.jar
contains the bootstrap classes, which are the run time classes that comprise the Java platform core API, and charsets.jar
contains the character-conversion classes. Aside from the ext
subdirectory, there are several additional resource subdirectories not described here.
Default installation directory for extensions to the Java platform. This is where the JavaHelp
JAR file goes when it is installed, for example. This directory includes the jfxrt.jar
file, which contains the JavaFX runtime libraries and the localedata.jar
file, which contains the locale data for the java.text
and java.util
packages. See The Extension Mechanism.
Contains files used for security management. These include the security policy java.policy
and security properties java.security
files.
JAR files that contain support classes for applets can be placed in the lib/applet/
directory. This reduces startup time for large applets by allowing applet classes to be preloaded from the local file system by the applet class loader and provides the same protections as though they had been downloaded over the Internet.
Font files used by the platform.
This section describes the directory structure for Java source code, C header files, and other additional directories and files.
jdk-1.8 include man src.zip
Archive that contains the source code for the Java platform.
C-language header files that support native-code programming with various libraries including: