javafxc- JavaFX Compiler Utility
javafxc - JavaFX Compiler Utility
javafxc [options] [sourcefiles] [@argfiles]
- Command-line options.
- One or more source files to be compiled (such as
- One or more files that list options and source files. The -J options are not allowed in these files.
javafxc tool reads JavaFX Script source files
and compiles them into JVM bytecode class files. You can pass source code file names to
javafxc in two ways:
javafxccommand line, preceded by an
Each source code file must have an
.fx suffix. It is compiled into a module class file with the same root name and a
.class suffix. For example, a module called
MyModule will be written in a source file called
MyModule.fx and compiled into a module file called
MyModule.class. Module files are Java platform class files,
just like class files created with the Java programming language.
Class definitions produce additional class files. These class files
have names combining the module and class names, such as
You should arrange source files in a directory tree that reflects
their package tree. For example, if you keep all your source files in
/workspace, the source code for
com.mysoft.mypack.MyModule should be in
By default, the compiler puts each class file in the same directory
as its source file. You can specify a separate destination directory with the
-d option. For more information, see Options.
The compiler has a set of standard options that are supported on the
current development environment.
An additional set of nonstandard options are specific to the current
virtual machine and compiler implementations. Non-standard options begin with
- Specify where to find user class files and (optionally) source files. This classpath declaration overrides the user classpath declaration in the
CLASSPATHenvironment variable. If neither
-classpathis specified, the user
classpathconsists of the current directory. If the
-sourcepathoption is not specified, the user
classpathis also searched for source files.
Note: The directory specified by
-dis not automatically added to your user
- Specify where to place generated class files.
- Show a description of each use or override of a deprecated member or class. Without
javafxcshows a summary of the source files that use or override deprecated members or classes.
-deprecationis shorthand for
- Set the source file encoding name, such as
-encodingis not specified, the platform default converter is used.
- Override location of endorsed standards path.
- Generate all debugging information, including local variables. By default, only line number and source file information is generated.
- Do not generate any debugging information.
- Generate only some kinds of debugging information, specified by a comma-separated list of keywords. Valid keywords are:
- Line number debugging information
- Local variable debugging information
- Source file debugging information
- Print a synopsis of standard options.
- Control the generation of class files for implicitly loaded source files. To automatically generate class files, use
-implicit:class. To suppress class file generation, use
-implicit:none. If this option is not specified, the default is to automatically generate class files. See Searching For Types.
- Disable warning messages. This has the same meaning as
- Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name. See Searching For Types.
Note: Classes found through the classpath might be subject to automatic recompilation if their sources are also found.
- Specify platform translator plug-in.
-profile [desktop | mobile | tv]
- Specify the JavaFX platform. The JavaFX SDK supports
tvand defaults to
desktop. Internally the
-profileoption specifies the configuration file, which is used for setting environment variables.
- Verbose output. This output includes information about each class loaded and each source file compiled.
- Display information about non-standard options and exit.
By default, classes are compiled against the bootstrap and
extension classes of the platform that
javafxc shipped with. But
also supports cross-compiling, where classes are compiled against a
bootstrap and extension classes of a different JavaFX platform implementation.
It is important to use
-extdirs when cross-compiling.
- Generate class files that target a specified version of the VM. Class files will run on the specified target and on later versions, but not on earlier versions of the VM. Valid targets are 1.1, 1.2, 1.3, 1.4, 1.5 (also 5) and 1.6 (also 6).
- Cross-compile against the specified set of boot classes. As with the user-defined
bootclasspathentries are separated by colons (:) and can be directories, JAR archives, or ZIP archives.
- Cross-compile against the specified extension directories. Directories is a colon-separated list of directories. Each JAR archive in the specified directories is searched for class files.
- Displays the tool version and exists. Note: Use
-J-versionto get the Java platform version.
- Prepend to the bootstrap classpath.
- Append to the bootstrap classpath.
- Override location of bootstrap class files.
- Enable all recommended warnings. In this release, all available warnings are recommended.
- Disable all lint warnings.
- Set the maximum number of errors to print.
- Set the maximum number of warnings to print.
- Send compiler messages to the named file. By default, compiler messages go to
- Specify which file to read when both a source file and class file are found for a type. (See Searching For Types). If
-Xprefer:neweris used, it reads the newer of the source or class file for a type (default). If the
-Xprefer:sourceoption is used, it reads the source file.
- Pass an option to the
javalauncher called by
javafxc. For example,
-J-Xms48msets the startup memory to 48 megabytes. Although it does not begin with
-X, it is not a `standard option' of
-extdirsoptions do not specify the classes used to run
javafxc. Modifying the compiler implementation in this way is always risky. If you do need to do this, use the
-Joption to pass through options to the underlying
To shorten or simplify the
javac command line, you can specify one
or more files that themselves contain arguments to the
javafxc command (except
This enables you to create
javafxc commands of any
length on any operating system.
An argument file can include
javafxc options and source filenames
in any combination. The arguments within a file can be space-separated or
newline-separated. If a file name contains embedded spaces, put the whole
file name in double quotes.
File names within an argument file are relative to the current directory,
not the location of the argument file. Wildcards (*) are not allowed in
these lists (such as for specifying
*.java). Use of
the '@' character to recursively interpret files is
not supported. The
-J options are not supported because
they are passed to the launcher, which does not support argument files.
When executing the
javac utility, pass in the path and name of each argument
file with the '@' leading character. When
javac encounters an argument
beginning with the character `@', it expands the contents of that file
into the argument list.
When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.
For example, when you create a
you are also using Button's ancestor classes:
When the compiler needs type information, it looks for a source file
or class file that defines the type. The compiler searches for class files
first in the bootstrap and extension classes, then in the user class path
(which by default is the current directory). The user classpath is defined
by setting the
CLASSPATH environment variable or by using
-classpath command line option.
If you set the
-sourcepath option, the compiler
searches the indicated path for source files. Otherwise the compiler
searches the user classpath for both class files and source files.
You can specify different bootstrap or extension classes with the
A successful type search might produce a class file, a source file, or
both. If both file types are found, you can use the
to instruct the compiler which to use. If
specified, the compiler will use the newer of the two files. If
source is specified, it will use the source file. The
If a type search finds a source file for a required type, either by
itself or as a result of the setting for
compiler will read the source file to get the information it needs. In
addition, it will by default compile the source file as well. You can use
the -implicit option to specify the behavior. If
none is specified, no class files are generated for
the source file. If
class is specified, class files are generated for the source file.