Java Reference
In-Depth Information
Click the
OK
button when the proper directory is selected. You'll return
to the
JDK
& Global Libraries
window, but a new Java version will be
listed in the left panel, and a list of the class
JAR
s will appear under the
Classpath
tab in the right panel.
6
The
Classpath
is the set of class directories and
JAR
files that make up the Java
API
and its extensions. By default,
IDEA
includes all the libraries and extension
JAR
s
included with the
JDK
. If you need to add additional libraries, click the
Add
but-
ton to do so, but you should never have to do this for any standard
JDK
. You
should only include
JDK
-related libraries and extensions in this list.
IDEA
pro-
vides a different mechanism for configuring third-party shared classes (shared
libraries), as we'll discuss in chapter 4.
The
Sourcepath
tab tells
IDEA
where it can find the source code associated
with the class files specified in the first tab. You can specify not only directories
but also
JAR
files.
IDEA
will automatically extract and parse the source files from
the
JAR
file if specified. Including source files isn't required, but doing so
improves
IDEA
's ability to provide inline help while coding.
Figure 1.6 The JDK Setup window. This window is used to define each of the target JDKs on your
local system. A target JDK is an installed JDK that can be used as the basis of an IDEA Java project.