XXX
Builds one or more Java class files
from one or more source trees of .java files.
The class files will be placed underneath
the specified target directory.
SCons will parse each source .java file
to find the classes
(including inner classes)
defined within that file,
and from that figure out the
target .class files that will be created.
SCons will also search each Java file
for the Java package name,
which it assumes can be found on a line
beginning with the string
package
in the first column;
the resulting .class files
will be placed in a directory reflecting
the specified package name.
For example,
the file
Foo.java
defining a single public
Foo
class and
containing a package name of
sub.dir
will generate a corresponding
sub/dir/Foo.class
class file.
Example:
env.Java(target = 'classes', source = 'src')
env.Java(target = 'classes', source = ['src1', 'src2'])
The Java compiler.
The command line used to compile a directory tree containing
Java source files to
corresponding Java class files.
Any options specified in the &cv-JAVACFLAGS; construction variable
are included on this command line.
The string displayed when compiling
a directory tree of Java source files to
corresponding Java class files.
If this is not set, then &cv-JAVACCOM; (the command line) is displayed.
env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES")
General options that are passed to the Java compiler.
The directory in which Java class files may be found.
This is stripped from the beginning of any Java .class
file names supplied to the
JavaH
builder.
The suffix for Java class files;
.class
by default.
The suffix for Java files;
.java
by default.