没有JDK的JRE 6(Windows)上的堆转储 [英] Heap dump on JRE 6 (Windows) without JDK

查看:94
本文介绍了没有JDK的JRE 6(Windows)上的堆转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在未安装JDK的远程计算机上创建堆转储?

Is there a way to create a heap dump on a remote machine without JDK installed?

我无法更改安装/设置,并且它正在Windows上运行. 因此,我可以轻松使用命令行工具.

I can't change the installation / settings and it's running on Windows. So I have pnly access to commandline tools.

问题是远程计算机上的Java应用程序冻结(没有内存不足异常,因此-XX:-HeapDumpOnOutOfMemoryError没用),我们需要创建转储.

Problem is that a Java app on a remote machine freezes (no out of memory exception so -XX:-HeapDumpOnOutOfMemoryError is useless) and we need to create a dump.

-XX:+HeapDumpOnCtrlBreak 

也没有选择,因为JDK6 +不再支持它.

is no option too, because it's not supported anymore on JDK6+.

出于安全原因,不允许使用JMX.

JMX is not allowed due to security reasons.

有什么想法吗?谢谢您的帮助!

Any Ideas? Thank you for your help!

  • Windows
  • 没有JDK
  • 没有JMX

推荐答案

我认为我已经解决了问题.

I think I solved the problem.

您必须用JDK的某些文件修补"您的JRE(当然是相同版本-如果您正在运行jre6uXX,则需要jdk6uXX中的相应文件)

You have to "patch" your JRE with some files of the JDK (the same version of course - if you are running jre6uXX you need the corresponding files from jdk6uXX )

复制以下文件:

  • \ JDK6uXX \ bin \ attach.dll->%JAVAJRE_HOME%\ bin \
  • \ JDK6uXX \ bin \ jmap.exe->%JAVAJRE_HOME%\ bin \
  • \ JDK6uXX \ lib \ tools.jar->%JAVAJRE_HOME%\ lib \

没有文件被覆盖,JRE不受此影响.

No files are overwritten, JRE shouldn't be affected by this.

现在您可以很好地使用jmap进行转储了;-)

Now you can use jmap just fine to take dumps ;-)

感谢您的帮助!再见

这篇关于没有JDK的JRE 6(Windows)上的堆转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆