javac is actually a command used for compilation. It just uses some options to assist compilation. Take a look at the usage instructions of javac: javac
Among them, maybe Options include:
-g generates all debugging information
-g:none does not generate any debugging information
-g:{lines,vars,source} Generate only some debugging information
-nowarn generate no warnings
-verbose output messages about what the compiler is doing
-deprecation output using Source location of obsolete API
-classpath Specifies to find user class files and annotation handlers
-cp Specifies to find user class files and annotation handlers
p>
-sourcepath specifies the location to search for input source files
-bootclasspath overrides the location of boot class files
-extdirs overrides the installed The location of the extensions directory
-endorseddirs The location of the fully qualified path to the overridden signature
-proc:{none,only} Controls whether annotation processing and/or compilation is performed.
-processor [,,...] Search process for the annotation processor
to run
-processorpath specifies the location to find annotation handlers
-d specifies the location to store the generated class files
-s specifies the location to store the generated source files
-implicit:{none,class} specifies whether to generate class files for implicitly referenced files
-encoding specifies the character encoding used by the source file
-source Provide source compatibility with the specified version
-target Generate class files for a specific VM version
-version version information
-help prints a summary of standard options
-Akey[=value] options passed to the annotation handler
-X prints a summary of non-standard options
-J directly passes the to the runtime system. The more commonly used ones are -d . When compiling classes with packages, it is more common to use javac -d . Test.java There are also some comparisons -encoding, The -cp and -g command instructions are above. I don’t know what the specific techniques are. Anyway, just follow the instructions to get the result you want. If you don’t understand what’s going on, you can try them one by one p>