O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

javac

Synopsis

    javac [options]files

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.

In the case that there are too many files to list on the command line, you may list the source and class files in a separate file, and indicate the contents of the file to javac by prepending an @ to the filename.

Options

-bootclasspath path

Use the colon-separated list of directories in path for the boot classes, instead of the boot classes used by the java command itself.

-classpath path

Use 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.

-cldc1.0

For compiling CLDC programs. This causes the compiler to generate stack maps, which obviates the need for the preverifier.

-d dir

Specify where to create generated class files.

-deprecation

Warn about every use or override of a deprecated member or class, instead of warning at the end.

-Djava.ext.dirs= dirs

Use dirs as the location for installed extensions.

-Djava.endorsed.dirs= dirs

Use dirs as the endorsed standards path.

-encoding encoding

The source file is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required