如何在 ECLIPSE 中调试 .class 文件?

2023-10-15Java开发问题
36

本文介绍了如何在 ECLIPSE 中调试 .class 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在使用 Eclipse 3.5,并将 src.zip 附加到 Eclipse 中的全局设置中.Windows--> Preferences -->Java -->Installed JREs -->rt.jar - 源附件 - ...../jdk/src.zip

I am using Eclipse 3.5 and I attached the src.zip to my global settings in Eclipse. Windows--> Preferences -->Java -->Installed JREs -->rt.jar - Source attachment - ...../jdk/src.zip

我能够成功地进入 java 核心库 .class 文件并查看源代码.我构建了一个使用 LinkedList 的类,并在 LinkedList 类中设置了一个断点.

I am successfully able to step in the java core library .class files and view the source code. I building a Class which uses the LinkedList and I have set a breakpoint inside the LinkedList class.

当我在源代码(我的项目)中调试断点时运行良好,但是当我需要进入 java 核心库 .classes 时,我在 Eclipse 中收到以下错误

When I debug the breakpoints in my source code (my projects) are working good but when I need to step into the java core lib .classes I get the following error in my Eclipse

由于缺少行号属性,无法在 java.util.LinkedList 中安装断点.修改编译器选项以生成行号属性.

我在 Preferences 中检查了我的编译器设置,发现所有选项都选中了 true.如果有人能帮我解决这个问题,那就太好了.

I checked my complier settings in Preferences and found all options checked true. It would to great if someone can help me resolve this issue.

提前致谢.

推荐答案

您可能已将编译器设置为在您的类文件中包含调试信息,但 rt.jar 中的类文件不是这样编译的.您需要重新编译 rt.jar 中类的所有源代码(不适合胆小的人),或者 下载jdk 的调试版本.

You may have the compiler set to include debugging information in YOUR class files, but the class files in rt.jar weren't compiled that way. You need to either recompile all the source for the classes in rt.jar (not for the faint of heart), or download a debug build of the jdk.

这篇关于如何在 ECLIPSE 中调试 .class 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何使用 JAVA 向 COM PORT 发送数据?
How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)...
2024-08-25 Java开发问题
21

如何使报表页面方向更改为“rtl"?
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)...
2024-08-25 Java开发问题
19

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

有没有办法在 Java 中检测 RTL 语言?
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)...
2024-08-25 Java开发问题
11

如何在 Java 中从 DB 加载资源包消息?
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)...
2024-08-25 Java开发问题
13

如何更改 Java 中的默认语言环境设置以使其保持一致?
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)...
2024-08-25 Java开发问题
13