Java工具应用(转老外)

本文介绍了多个Java工具的功能和使用方法,包括jmap用于打印内存映射,jhat用于堆内存分析,jconsole用于监控和管理Java应用,jps列出目标系统上的JVM进程,jstack打印Java线程堆栈跟踪,jinfo显示配置信息,jrunscript作为命令行脚本外壳,jstat监控JVM统计信息,以及Java Visual VM工具用于分析堆转储和核心文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jmap (memory map) prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64-bit VM, you may need to specify the -J-d64 option.

jhat (Java heap analysis tool) command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre-designed queries (such as ‘show all instances of a known class “Foo”‘) as well as OQL (Object Query Language) – a SQL-like query language to query heap dumps.

jconsole (Java monitoring and management console) command launches a graphical console tool that enables you to monitor and manage Java applications and virtual machines on a local or remote machine.

jps (JVM process status tool) tool lists the instrumented HotSpot Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.

jstack (stack trace) prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, ‘bci’ (byte code index) and line number, if available, are printed.

jinfo (configuration info) prints Java configuration information for a given Java process or core file or a remote debug server. Configuration information includes Java System properties and Java virtual machine command line flags. If the given process is running on a 64-bit VM, you may need to specify the -J-d64 option.

jrunscript (command line script shell) is a command line script shell. jrunscript supports both an interactive (read-eval-print) mode and a batch (-f option) mode of script execution.

jstat (JVM statistics monitoring tool) tool displays performance statistics for an instrumented HotSpot Java virtual machine (JVM). The target JVM is identified by its virtual machine identifier.

jvisualvm – The Java VisualVM tools distributed with the JDK since JDK 6 update 7 can also be used to analyze heap dumps, thread dumps, and core files. See in particular Working with Core Dumps in the Java VisualVM guide.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值