Java Reference
In-Depth Information
source directories into the output directory, preserving whatever directory struc-
ture they exist under (relative to the source path).
IDEA
relies on the name of the
file to determine which files are resource files. By default, it recognizes the follow-
ing file extensions:
■
.properties
■
.xml
■
.html
■
.dtd
■
.tld
■
.gif
■
.png
■
.jpeg
■
.jpg
You can customize this behavior through the
Compiler
control panel (discussed
in the next section), located in the
IDE
Settings. The
Resource patterns
field
specifies a regular expression used to identify which files are resources. You can
easily add your own extensions to the list or modify the default selections.
5.1.2
Setting up a compiler
A number of compilation options are available through the
Compiler
control
panel of the
IDE
Settings
. Select the
Compiler
option to bring up the configura-
tion panel, shown in figure 5.1. The compiler properties are saved with your
project, allowing you to use different compilation setups for different applications.
The
Compiler
configuration panel in version 5.0 may look slightly different and
include some additional options. Figure 5.1 shows the
Compiler
configuration
panel from version 4.5.
If you're using Java 1.4 or later and want to enable the use of the
assert
keyword, you must do so in the project's
Paths
settings panel. This is dis-
abled by default to maximize compatibility with older source code.
TIP
Excluding paths from compilation
If your project path includes files that you wish to specifically exclude from the
compilation process, add them to the list of excluded entries in the central part of
the
Compiler
dialog. You can add individual files as well as directories. Be sure to