检查Java字节码是否包含调试符号 [英] Check if Java bytecode contains debug symbols

查看:96
本文介绍了检查Java字节码是否包含调试符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何检查编译的Java类是否包含调试符号。问题是我使用debug =on从ant编译应用程序,但是特定的JVM会抛出异常:它表示缺少调试符号。

I would like to know how can I check if a compiled Java class contains debug symbols. The problem is that I compile an application from ant with debug="on", but a specific JVM throws an exception: it says that the debug symbols are missing.

谢谢。

推荐答案

如果在类文件上运行 javap -v ,您将看到可用的调试信息。值得编译一个简单的测试类,使用不同的 -g 选项设置,并使用 javap 查看结果。

If you run javap -v on the class file, you will see the debug information that is available. It is worth compiling a simple test class with different -g option settings and looking at the results with javap.

这篇关于检查Java字节码是否包含调试符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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