Java Reference
In-Depth Information
javafxc accepts numerous command-line arguments to control how and what sources
get compiled, as shown in the following command:
javafxc [options] [sourcefiles] [@argfiles]
where options are your command-line options, followed by one or more source files,
which can be followed by list of argument files. Below are some of the more commonly
javafxc arguments:
F classpath (-cp)—the classpath option specifies the locations (separated by a path
separator character) where the compiler can find class files and/or library jar files
that are required for building the application.
javafxc -cp .:lib/mylibrary.jar MyClass.fx
F sourcepath—in more complicated project structure, you can use this option to specify
one or more locations where the compiler should search for source file and satisfy
source dependencies.
javafxc -cp . -sourcepath .:src:src1:src2 MyClass.fx
F -d—with this option, you can set the target directory where compiled class files are
to be stored. The compiler will create the package structure of the class under this
directory and place the compiled JavaFX classes accordingly.
javafxc -cp . -d build MyClass.fx
When specifying the source files, you can use the wild card characters to indicate
multiple source files to be compiled as follows:
javafxc -d build src/*.fx
F The @argfiles option lets you specify a file which can contain javafxc
command-line arguments. When the compiler is invoked and a @argfile
is found, it uses the content of the file as an argument for javafxc. This can
help shorten tediously long arguments into short, succinct commands.
Assume file cmdargs has the following content
-d build
-cp .:lib/api1.jar:lib/api2.jar:lib/api3.jar
-sourcepath core/src:components/src:tools/src
Then you can invoke javafxc as:
$> javafxc @cmdargs
See also
F Installing the JavaFX SDK
Search WWH ::

Custom Search