javac
[options] filesSolaris only. Compile Java source code into Java bytecode, for execution with java. Java source files must have a .java
suffix and must be named for the class whose code they contain. The generated bytecode files have a .class
suffix. By default, class files are created in the same directory as the corresponding source files. Use the CLASSPATH variable to list directories and/or ZIP files that javac will search to find your classes.
-classpath
pathUse the colon-separated list of directories in path instead of CLASSPATH to find class files. It is usually a good idea to have the current directory (".") on the search path.
-d
dirSpecify where to create generated class files.
-depend
Recompile missing or out-of-date class files referenced from other class files, not just from source code.
-deprecation
Warn about every use or override of a deprecated member or class, instead of warning at the end.
-encoding
encodingThe source file is encoded using encoding. Without this option, the system's default converter is used.
-g
Generate debugging tables with line numbers. With -O
, also generate information about local variables.
-J
optionPass option to java. option should not contain spaces; use multiple -J
options if necessary.
-nowarn
Disable all warnings.
-O
Perform optimizations that may produce faster but larger class files. It may also slow down compilation. This option should be used with discretion.
-verbose
Print messages as files are compiled and loaded.