且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Linux上调试本机Java崩溃?

更新时间:2023-12-03 23:05:10

除非您的JNI库破坏了随机内存区域(这极其难以调试),否则最可能导致libjvm崩溃的原因是bug在JVM中.鉴于当前版本是Java 6 update 23,而您具有Java 6 update 3,所以升级是我首先要尝试的方法.

Unless your JNI library has corrupted a random area of memory (which is extreamly difficult to debug), the most likely cause of a crash in the libjvm is a bug in the JVM. Given the current release is Java 6 update 23 and you have Java 6 update 3, upgrading is the first thing I would try.

顺便说一句:同样,您似乎拥有64位操作系统,您可能想尝试64位Java.

BTW: Also you appear to have a 64-bit OS, you might like to try the 64-bit Java.

BTW2:您可以将-Xmx2000000k写为-mx2g.无论如何,一台8 GB计算机上的默认最大值应该约为2 GB.

BTW2: You can write -Xmx2000000k as -mx2g. The default maximum on a 8 GB machine should be about 2 GB anyway.