未來版本中移除。
在版本搜尋中包括/排除使用者專用 JRE
-? -help 列印此說明訊息
-X 列印非標準選項的說明
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
啟用含指定詳細程度的宣告
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
停用含指定詳細程度的宣告
-esa | -enablesystemassertions
啟用系統宣告
-dsa | -disablesystemassertions
停用系統宣告
-agentlib:<libname>[=<options>]
載入原生代理程式程式庫 <libname>,例如 -agentlib:hprof
另請參閱 -agentlib:jdwp=help 與 -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
使用完整路徑名稱載入原生代理程式程式庫
-javaagent:<jarpath>[=<options>]
載入 Java 程式語言代理程式,請參閱 java.lang.instrument
-splash:<imagepath>
顯示指定影像的軟體資訊畫面
請參閱 http://www.oracle.com/technetwork/java/javase/documentation/index.html 暸
解詳細資訊。
C:\Users\student>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files and annotati
on processors
-cp <path> Specify where to find user class files and annotati
on processors
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compil
ation is done.
-processor <class1>[,<class2>,<class3>...] Names of the annotation processors
to run; bypasses default discovery process
-processorpath <path> Specify where to find annotation processors
-parameters Generate metadata for reflection on method paramete
rs
-d <directory> Specify where to place generated class files
-s <directory> Specify where to place generated source files
-h <directory> Specify where to place generated native header file
s
-implicit:{none,class} Specify whether or not to generate class files for
implicitly referenced files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-profile <profile> Check that API used is available in the specified p
rofile
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
-Werror Terminate compilation if warnings occur
@<filename> Read options and filenames from file
C:\Users\student>cd C:\Users\student\Desktop
C:\Users\student\Desktop>HelloWorld
'HelloWorld' 不是內部或外部命令、可執行的程式或批次檔。
C:\Users\student\Desktop>HelloWorld.java
C:\Users\student\Desktop>javac HelloWorld.java
C:\Users\student\Desktop>javac HelloWorld
error: Class names, 'HelloWorld', are only accepted if annotation processing is
explicitly requested
1 error
C:\Users\student\Desktop>java HelloWorld
Hello! World!
C:\Users\student\Desktop>
留言列表