The $(javac) command compiles the Java code.


$(javac) [options] filePath
  1. options are described in Table 1.
  2. filePath is the path of the source files to be compiled.


Table 1. $(javac) options
Option Description
-d Destination directory.
classpath [–cp]

Specify where to find the user class files.

-source version Specify the version of source code. The default value is the JDK version set in the configuration.
-sourcepath Specify the source code path to search for class or interface definition.
-target version Generate class files that target a specified version of the Virtual Machine. Class files will run on the specified target and on later versions, but not on earlier versions of the VM.
-bootclasspath bootclasspath Cross-compile against the specified set of boot classes. Boot class path entries are separated by colons (:) and can be directories, JAR archives, or ZIP archives.
-verbose Verbose compilation.