Usage: javac <options> <source files>
where <options> include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O optimize;may hinder debugging or enlarge class files
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version
本文详细介绍了 Java 编译器 javac 的各种选项及其用途,包括调试信息生成、优化设置、警告抑制等。此外还介绍了如何指定类路径、源文件路径以及目标 VM 版本等。
455

被折叠的 条评论
为什么被折叠?



