jdk配置
1
編輯系統(tǒng)變量
JAVA_HOME:D:\Dev_tools\jdk1.6.0
2
Set Path:
path:C:\Program Files\Common Files\NetSarang;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;
3 測(cè)試java
Ctrl + Esc?? r?? cmd? 敲 javac and?java??
C:\Documents and Settings\Administrator>javac
用法:javac <選項(xiàng)> <源文件>
其中,可能的選項(xiàng)包括:
? -g???????????????????????? 生成所有調(diào)試信息
? -g:none??????????????????? 不生成任何調(diào)試信息
? -g:{lines,vars,source}???? 只生成某些調(diào)試信息
? -nowarn??????????????????? 不生成任何警告
? -verbose?????????????????? 輸出有關(guān)編譯器正在執(zhí)行的操作的消息
? -deprecation?????????????? 輸出使用已過(guò)時(shí)的 API 的源位置
? -classpath <路徑>??????????? 指定查找用戶類文件和注釋處理程序的位置
? -cp <路徑>?????????????????? 指定查找用戶類文件和注釋處理程序的位置
? -sourcepath <路徑>?????????? 指定查找輸入源文件的位置
? -bootclasspath <路徑>??????? 覆蓋引導(dǎo)類文件的位置
? -extdirs <目錄>????????????? 覆蓋安裝的擴(kuò)展目錄的位置
? -endorseddirs <目錄>???????? 覆蓋簽名的標(biāo)準(zhǔn)路徑的位置
? -proc:{none,only}????????? 控制是否執(zhí)行注釋處理和/或編譯。
? -processor <class1>[,<class2>,<class3>...]要運(yùn)行的注釋處理程序的名稱;繞過(guò)默認(rèn)的搜索進(jìn)程
? -processorpath <路徑>??????? 指定查找注釋處理程序的位置
? -d <目錄>??????????????????? 指定存放生成的類文件的位置
? -s <目錄>??????????????????? 指定存放生成的源文件的位置
? -implicit:{none,class}???? 指定是否為隱式引用文件生成類文件
? -encoding <編碼>???????????? 指定源文件使用的字符編碼
? -source <版本>?????????????? 提供與指定版本的源兼容性
? -target <版本>?????????????? 生成特定 VM 版本的類文件
? -version?????????????????? 版本信息
? -help????????????????????? 輸出標(biāo)準(zhǔn)選項(xiàng)的提要
? -Akey[=value]????????????? 傳遞給注釋處理程序的選項(xiàng)
? -X???????????????????????? 輸出非標(biāo)準(zhǔn)選項(xiàng)的提要
? -J<標(biāo)志>???????????????????? 直接將 <標(biāo)志> 傳遞給運(yùn)行時(shí)系統(tǒng)
C:\Documents and Settings\Administrator>java
Usage: java [-options] class [args...]
?????????? (to execute a class)
?? or? java [-options] -jar jarfile [args...]
?????????? (to execute a jar file)
where options include:
??? -client?????? to select the "client" VM
??? -server?????? to select the "server" VM
??? -hotspot????? is a synonym for the "client" VM? [deprecated]
????????????????? The default VM is client.
??? -cp <class search path of directories and zip/jar files>
??? -classpath <class search path of directories and zip/jar files>
????????????????? A ; separated list of directories, JAR archives,
????????????????? and ZIP archives to search for class files.
??? -D<name>=<value>
????????????????? set a system property
??? -verbose[:class|gc|jni]
????????????????? enable verbose output
??? -version????? print product version and exit
??? -version:<value>
????????????????? require the specified version to run
??? -showversion? print product version and continue
??? -jre-restrict-search | -jre-no-restrict-search
????????????????? include/exclude user private JREs in the version search
??? -? -help????? print this help message
??? -X??????????? print help on non-standard options
??? -ea[:<packagename>...|:<classname>]
??? -enableassertions[:<packagename>...|:<classname>]
????????????????? enable assertions
??? -da[:<packagename>...|:<classname>]
??? -disableassertions[:<packagename>...|:<classname>]
????????????????? disable assertions
??? -esa | -enablesystemassertions
????????????????? enable system assertions
??? -dsa | -disablesystemassertions
????????????????? disable system assertions
??? -agentlib:<libname>[=<options>]
????????????????? load native agent library <libname>, e.g. -agentlib:hprof
??????????????????? see also, -agentlib:jdwp=help and -agentlib:hprof=help
??? -agentpath:<pathname>[=<options>]
????????????????? load native agent library by full pathname
??? -javaagent:<jarpath>[=<options>]
????????????????? load Java programming language agent, see java.lang.instrument
??? -splash:<imagepath>
????????????????? show splash screen with specified image
C:\Documents and Settings\Administrator>OK 你成功了第一步。
posted on 2008-07-29 09:14 Anderson 閱讀(480) 評(píng)論(0) 編輯 收藏 所屬分類: java