创建及构建应用(Create and Build Applications)
appletviewer
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/appletviewer.html#BGBEAIGG
appletviewer 提供了一个Java运行环境,可在浏览器外部运行Applet;
extcheck
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/extcheck.html
Detects version conflicts between a target Java Archive (JAR) file and currently installed extension JAR files.
jar
JAR文件操作程序;用于将多个文件打包成一个JAR文件,或者解压JAR文件。
javadoc
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDIBDDD
to generate API documentation from javadoc™ comments
java
启动器,用于启动JVM示例来运行Java应用程序。
javac,读取Java类和接口定义,并将其编译为bytecode和.class文件。
javah
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javah.html#BJEEFAIG
to generate C header files for native methods
javah produces C header and C source files from a Java class.
javap
Java Class文件反汇编器。
jdb
Java的一个命令行调试环境,既可在本地,也可在与远程的解释器的一次对话中执行;
jdeps
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jdeps.html#BACEHAGD
Java class dependency analyzer.
Security tools
keytool
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html#CHDBGFHE
Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.
jarsigner
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jarsigner.html#CCHEAHCH
Signs and verifies Java Archive (JAR) files.
policytool
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/policytool.html#BABECFFA
Reads and writes a plain text policy file based on user input through the utility GUI.
Deploy Applications and Applets
pack200
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/pack200.html#CHDDCCCC
Packages a JAR file into a compressed pack200 file for web deployment.
unpack200
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/unpack200.html#BABDDHFE
Transforms a packed file produced by pack200(1) into a JAR file for web deployment.
Monitor the JVM
jps
MK:显示指定系统内所有的 HotSpot虚拟机 进程,并且该命令仅报告有访问权限的 JVM 的信息;
jstat: JVM Statistics Monitoring Tool,用于收集 HotSpot 虚拟机各方面运行数据、统计信息,包括GC、类加载、JIT信息等;
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html#BEHHGFAE
jstatd
功能:
java虚拟机的jstat守护程序—启动一个RMI服务器程序来监视各个HotSpot java虚拟机的创建和中止。并且提供了一个访问远程监视工具接入的接口。
jstatd是一个Java远程方法调用(RMI)服务器应用程序-它监控测量Java HotSpot虚拟机的创建和终止并且提供一个接口来允许远程监控工具依附到运行于本地主机的JVM(请参考《jstatd-Virtual Machine jstat Daemon》)。
在应用系统中的使用
jps及其它jvmstat实用程序都使用极为轻量级的观察机制。由JVM分配一小部分共享内存,而性能计数器也是从这部分内存中分配的。JVM子系统基于其感兴趣的事件更新性能计数器。客户端工具仅仅负责异步地从共享内存段中进行读取。因此,总的来说,使用jvmstat进行监控的效果是很小的。
Monitor Java Applications
jconsole
J2SE监测和管理控制台—一个同JMX兼容的监测Java虚拟机的图形工具。其能够监视当地或者远程的Java虚拟机。
另外,尽管JConsole在监视本地应用程序的开发和快速原型开发中很有用,但在实际的应用系统中不推荐使用。理由是,JConsole本身也消耗大量的系统资源。我们推荐的方法是用远程监控来把JConsole应用程序与被监控的系统加以隔离。因此,对于应用系统来说,以远程模式使用JConsole更好些。对于安全的远程监控来说,可以使用安全选项。
用法:具有图形界面,可直接操作,查看摘要、内存、线程、类、MBean,VM的信息。
Remote Method Invocation (RMI)
rmic
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/rmic.html#CIHCDBFH
http://blog.sina.com.cn/s/blog_553a9295010005n3.html
rmic 为远程对象生成 stub 和 skeleton。
Generates stub, skeleton, and tie classes for remote objects that use the Java Remote Method Protocol (JRMP) or Internet Inter-Orb protocol (IIOP). Also generates Object Management Group (OMG) Interface Definition Language (IDL)
rmid
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/rmid.html#CIHCJFEI
rmid 启动激活系统守护进程,以便能够在 Java 虚拟机上注册和激活对象。
Starts the activation system daemon that enables objects to be registered and activated in a Java Virtual Machine (JVM).
rmiregistry
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/rmiregistry.html#CHDEEAFJ
rmiregistry 命令可在当前主机的指定端口上启动远程对象注册服务程序。
Starts a remote object registry on the specified port on the current host.
serialver
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/serialver.html
Returns the serial version UID for specified classes.
故障排除与调试(Troubleshooting)
jinfo: Configuration Info for Java,获取虚拟机的配置信息,也可以在运行期间修改参数;
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jinfo.html#BCGEBFDD
MK:显示虚拟机配置信息;
jmap: Memory Map for Java,生成虚拟机的内存转储快照(headdump文件),或者共享对象的内存映射;打印进程、核心转储文件、远程调试服务的 so内存映射 或者 堆内存的详细信息。
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jmap.html#CEGCECJB
Prints shared object memory maps or heap memory details for a process, core file, or remote debug server.
This command is experimental and unsupported.
jmap 版本要和 程序运行的版本相同,否则会返回类似的错误:Error attaching to process: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.72-b15. Target VM is 25.73-b02
jhat: JVM Heap Dump Browser
MK:用于分析 heapdump 文件,介于web服务器;
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jhat.html#CIHHJAGE
Analyzes the Java heap.
This command is experimental and unsupported.
jsadebugd
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/jsadebugd.html#BHBCGGGH
Attaches to a Java process or core file and acts as a debug server.
This command is experimental and unsupported.
jstack
为Java进程、核心文件、远程调试服务器打印Java线程栈跟踪。
Scripting
jjs
Java IDL and RMI-IIOP
tnameserv
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/tnameserv.html#CACCHFHJ
Interface Definition Language (IDL).
idlj
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/idlj.html#BGBEEGCI
Generates Java bindings for a specified Interface Definition Language (IDL) file.
orbd
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/orbd.html#CIHCHGGA
Enables clients to locate and call persistent objects on servers in the CORBA environment.
servertool
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/servertool.html#BHBDJEAE
Provides an easy-to-use interface for developers to register, unregister, start up, and shut down a persistent server.
Internationalization
native2ascii
http://docs.oracle.com/javase/8/docs/technotes/tools/unix/native2ascii.html#BGBBHBEH
Creates localizable applications by converting a file with characters in any supported character encoding to one with ASCII and/or Unicode escapes or vice versa.
将含有本地编码字符(既非 Latin1 又非 Unicode 字符)的文件转换为 Unicode 编码字符的文件。
native2ascii.exe 是Java的一个文件转码工具,是将特殊各异的内容转为用指定的编码标准文体形式统一的表现出来;
Web Services
schemagen
wsimport
wsgen
xjc
Unknow
javafxpackager
javapackager
java-rmi.cgi
javaws
jcontrol
jmc
jmc.ini
jrunscript
jvisualvm
参考文献