java-Xbootclasspath的⽤法.
昨晚使⽤eclipse的时候突然想到eclipse怎样去区分使⽤jdk1.4还是jdk1.5,我使⽤jdk1.4在eclipse运⾏⼀个java程序这时的command是 C:\j2sdk1.4.2_05\ -
Xbootclasspath:C:\j2sdk1.4.2_05\lib\tools.jar;C:\j2sdk1.4.2_05\jre\lib\rt.jar;C:\j2sdk1.4.2_05\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_05\jre\lib\jsse.jar;C:\j2sdk1.4.2_05\jre\lib\jce.ja -classpath E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\classes;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\jtds-
1.0.3.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-
2.5.1-final-20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-
contrib-2.5.1-final-20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-scratchpad-2.5.1-final-
20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\commons-logging-
1.0.
2.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\log4j-1.2.6.jar -Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1160 com.ansform.DoingTxt 红⾊部分后⾯的那些包是在eclipse重设置好的.这是使⽤
这些包作为启动类 .( set search path for bootstrap classes and resources )然⽽当我使⽤jdk1.5的时候的command是 C:\jdk1.5.0_03\ -classpath
E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\classes;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\jtds-
1.0.3.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-
2.5.1-final-20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-
contrib-2.5.1-final-20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\poi-scratchpad-2.5.1-final-
20040804.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\commons-logging-
1.0.
2.jar;E:\Eclipse_WorkSpace\Eclipse_Work\DateTransform\lib\log4j-1.2.6.jar -Xdebug -Xnoagent -
Xrunjdwp:transport=dt_socket,suspend=y,address=localhost:1635 com.ansform.DoingTxt 我们看到这时并没有-Xbootclasspath参数,我们知道java
程序中的所有依赖的类都会去classpath⾥⾯照.这时我想-Xbootclasspath做的⼯作应该时被做了,把那些系统必须的那些bootClass设置到了bootClasspath⾥⾯了 .
(以上想法时我个⼈的猜测,我上⽹了但是没有到满意的答案) 当你装好了jdk1.5时,它会拷贝⼀份到windows(winNt)⽬录下⾯,这样你就可以不⽤设置JAVA_HOME
然后把%JAVA_HOME%\bin放到系统的path⽬录了, ⽽且这时会⾃⼰设置好bootClass,这样你就不⽤在系统的环境变量⾥⾯设置ClassPath了. -Xbootclasspath:
<directories by="" separated="" files="" and="">
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories by="" separated="" files="" and="">
append to end of bootstrap class path
-Xbootclasspath/p:<directories by="" separated="" files="" and="">
prepend in front of bootstrap class path</directories></directories></directories> 最后给出些%JAVA_HOME%\bin⾥⾯⼀些exe的⽤法.(⽹上的)
⽤法:java [-options] class []
(to execute a class)
或 java -jar [-options] jarfile []
(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 -classpath <directories by="" separated="" files="" and="">
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -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
java -X
-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-
Xbootclasspath:<directories by="" separated="" files="" and="">
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories by="" separated="" files="" and="">
append to end of bootstrap class path
-Xbootclasspath/p:<directories by="" separated="" files="" and="">
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initialJava heap size
-
Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xrunhprof[:help]|[:=<value>, ...]
perform JVMPI heap, cpu, or monitor profiling
-Xdebug enable remote debugging
-Xfuture enable strictest checks, anticipating future default
-Xrs reduce use of OS signals by Java/VM (see documentation)
The -X options are non-standard and subject to change without notice.
====================
<
⽤法:javac <;选项> <;源⽂件>
可能的选项包括:
-g ⽣成所有调试信息
-g:none ⽣成⽆调试信息
-g:{lines,vars,source} ⽣成只有部分调试信息
-O 优化;可能妨碍调试或者增⼤类⽂件
-nowarn ⽣成⽆警告
-verbose 输出关于编译器正在做的信息
-deprecation 输出使⽤了不⿎励使⽤的API的源程序位置
-classpath <;路径> 指定⽤户类⽂件的位置
-sourcepath <;路径> 指定输⼊源⽂件的位置
-
bootclasspath <;路径> 覆盖⾃举类⽂件的位置
-extdirs <⽬录(多个)> 覆盖安装的扩展类的位置
-d <⽬录> 指定输出类⽂件的位置
-encoding <;编码> 指定源⽂件中所⽤的字符集编码
-target <;版本> ⽣成指定虚拟机版本的类⽂件
java中split的用法-help Print a synopsis of standard options
====================
<
⽤法:appletviewer <options> url
其中, <options> 包括:
-
debug 在 Java 调试器中启动 applet ⼩程序查看器
-encoding <encoding> 指定由 HTML ⽂件使⽤的字符编码
-J<runtime flag=""> 向 Java 解释器传递参数
-J 选项不是标准选项,如有更改,不另⾏通知。
====================
<
⽤法:jar {ctxu}[vfm0M] [jar-⽂件] [manifest-⽂件] [-C ⽬录] ⽂件名 ...
选项:
-c 创建新的存档
-t 列出存档内容的列表
-x 展开存档中的命名的(或所有的〕⽂件
-
u 更新已存在的存档
-v ⽣成详细输出到标准输出上
-f 指定存档⽂件名
-m 包含来⾃标明⽂件的标明信息
-0 只存储⽅式;未⽤ZIP压缩格式
-M 不产⽣所有项的清单(manifest〕⽂件
-i 为指定的jar⽂件产⽣索引信息
-C 改变到指定的⽬录,并且包含下列⽂件:
如果⼀个⽂件名是⼀个⽬录,它将被递归处理。
清单(manifest〕⽂件名和存档⽂件名都需要被指定,按&aposm' 和 &aposf'标志指定的相同顺序。⽰例1:将两个class⽂件存档到⼀个名为 &aposclasses.jar' 的存档⽂件中:
jar cvf classes.jar Foo.class Bar.class
⽰例2:⽤⼀个存在的清单(manifest)⽂件 &aposmymanifest' 将 foo/ ⽬录下的所有
⽂件存档到⼀个名为 &aposclasses.jar' 的存档⽂件中:
jar cvfm classes.jar mymanifest -C foo/ .
====================
<
⽤法:jarsigner [options] jar-file alias
jarsigner -verify [options] jar-file
[-keystore <url>] keystore location
[-storepass <password>] password for keystore integrity
[-storetype <type>] keystore type
[-keypass <password>] password for private key (if different)
[-sigfile <file>] name of .SF/.DSA file
[-signedjar <file>] name of signed JAR file
[-verify] verify a signed JAR file
[-verbose] verbose output when signing/verifying
[-certs] display certificates when verbose and verifying
[-internalsf] include the .SF file inside the signature block
[-sectionsonly] don&apost compute hash of entire manifest
[-provider] name of cryptographic service provider&aposs master class file
...
====================
<
⽤法:javadoc [options] [packagenames] [sourcefiles] [classnames] [@files]
-overview <file> 读取 HTML 格式的概述⽂档
-public 仅显⽰ public 类和成员
-protected 显⽰ protected/public 类和成员(缺省)
-package 显⽰ package/protected/public 类和成员
-private 显⽰所有类和成员
-help 显⽰命令⾏选项
-doclet <class> 通过候选 doclet ⽣成输出
-docletpath 指定 doclet 类⽂件的查位置
-sourcepath <pathlist> 指定源⽂件的查位置
-classpath <pathlist> 指定⽤户类⽂件的查位置
-
exclude <pkglist> Specify a list of packages to exclude
-subpackages <subpkglist> Specify subpackages to recursively load
-breakiterator Compute 1st sentence with BreakIterator
-bootclasspath <pathlist> 覆盖⾃举类加载器所加载的类⽂件的位置
-source <release> Provide source compatibility with specified release
-extdirs <dirlist> 覆盖已安装的扩展的位置
-verbose 有关 Javadoc 所做⼯作的输出信息
-locale <name> 所⽤的 Locale,例如 en_US 或 en_US_WIN
-encoding <name> 源⽂件编码名称
-J<flag> 将 <flag> 直接传给运⾏时系统
由标准 doclet 提供:
-
d <directory> 输出⽂件的⽬标⽬录
-use 创建类和包的⽤法页
-version 包含 @version 段
-author 包含 @author 段
-docfilessubdirs Recursively copy doc-file subdirectories
-splitindex 将索引分为每个字母对应⼀个⽂件
-windowtitle ⽂档的浏览器窗⼝标题
-doctitle <html-code> 包含包索引页(⾸页)的标题
-header <html-code> 包含每⼀页的页眉⽂本
-footer <html-code> 包含每⼀页的页脚⽂本
-bottom <html-code> 包含每⼀页的页底⽂本
-
link <url> Create links to javadoc output at <url>
-linkoffline <url> <url2> Link to docs at <url> using package list at <url2>
-excludedocfilessubdir <name1>:.. Exclude any doc-files subdirectories with given name.
-group <name> <p1>: <p2>.. Group specified packages together in overview page
-nocomment Supress description and tags, generate only declarations.
-nodeprecated 不包含 @deprecated 信息
-noqualifier <name1>:<name2>:... Exclude the list of qualifiers from the output.
-nosince Do not include @since information
-nodeprecatedlist 不⽣成不⿎励使⽤的列表
-notree 不⽣成类层次
-noindex 不⽣成索引
-
nohelp 不⽣成帮助链接
-nonavbar 不⽣成导航栏
-quiet Do not display status messages to screen
-serialwarn Generate warning about @serial tag
-tag <name>:<locations>: <header> Specify single argument custom tags
-taglet The fully qualified name of Taglet to register
-tagletpath The path to Taglets
-charset <charset> Charset for cross-platform viewing of generated documentation.
-helpfile <file> 包含帮助链接功能链接到⽬标的⽂件
-linksource Generate source in HTML
-stylesheetfile 改变所⽣成⽂档的样式的⽂件
-
docencoding <name> 输出编码名称
====================
<
⽤法:jdb <options> <class> <arguments>
where options include:
-help print out this message and exit
-sourcepath <directories by="" separated="">
directories in which to look for source files
-attach </directories></arguments></class></options> </name> </file></charset> </header> </locations></name></name2></name1></p2> </p1> </name>
</name1></url2></url></url2></url></url></url> </html-code> </html-code> </html-code> </html-code> </directory></flag></flag></name></name></dirlist> </release></pathlist> </subpkglist></pkgl
ist> </pathlist> </pathlist> </class></file></file></file></password> </type></password> </url></runtime></encoding> </options> </options> </value></size></size></size></file></directories></directories></directories></classname></packagename> </classname>
</packagename> </classname></packagename> </classname></packagename> </value></name></directories>
attach to a running VM at the specified address using standard connector
-listen
wait for a running VM to connect at the specified address using standard connector
-listenany
wait for a running VM to connect at any available address using standard connector
-launch
launch VM immediately instead of waiting for &aposrun' command
-
connect <connector-name>:<name1>=<value1>,...
connect to target VM using named connector with listed argument values
-dbgtrace [flags] print info for debugging jdb
-tclient run the application in the Hotspot(tm) Performance Engine (Client)
-tserver run the application in the Hotspot(tm) Performance Engine (Server)
options forwarded to debuggee process:
-v -verbose[:class|gc|jni]
turn on verbose mode
-D<name>=<value> set a system property
-classpath <directories by="" separated="">
list directories in which to look for classes
-
X non-standard target VM option
<class> is the name of the class to begin debugging
<arguments> are the arguments passed to the main() method of <class>
For command help type &aposhelp' at jdb prompt
====================
<
⽤法:javah [options] <classes>
其中 [options] 包括:
-help 打印该帮助信息
-classpath 类的加载路径
-bootclasspath ⾃举类的加载路径
-
d </classes></class></arguments></class></directories></value></name></value1></name1></connector-name>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论