Java – how do I use eclipse to check the status of debug symbols?

When discussing another question, I asked @ Aaron digulla and pointed out the following:

File Src Zip is for me, but I still can't access the source of JTable, as @ Aaron said What could be the problem? How can I solve this problem with eclipse?

a) I'm using eclipse. Why shouldn't I use the SDK?

b) How do I know if my SDK contains debugging symbols? If not, how can I add them?

c) How do I check if eclipse tells java to split debugging symbols?

Sorry for these mediocre questions, but I don't think I fully understand the java development process

Solution

a) Eclipse comes with its own java compiler, so if you use the Java runtime environment, you won't encounter many problems, except that additional content such as jarsigner and possible JRE source code may be lost The best way to verify the installation is through the package manager; However, if you install by other means, careful directory observation can usually distinguish the two (see below)

b) JRE libraries are usually compiled without debugging symbols SDK libraries usually have them Complete Java debugging by starting the JVM with the command line option to open the debug port The SDK communicates with the JVM and requests to set a breakpoint through this port Later, if you decide to step into the JVM, it will also send step / hop / rollback debugging commands through this port The "debug" symbol is actually a JVM bytecode table, which refers to a source code line valid from a specific bytecode instruction This allows the debugger to associate the running bytecode with the line number in the original source code

c) Verify it by (from the menu) window - > Preferences (on the selector column), expand Java, expand build path under Java, and then select classpath variable You will see some variables, including a variable named "jre_src", which should point to SRC that contains the source code of the JRE library for the public Zip file It is best to verify the JRE at the same time_ LIB.

JDK home directory usually contains "bin" subdirectory and "JRE" subdirectory, so if you only see "bin" subdirectory, you have a high probability of being in JRE home directory With this knowledge, I hope you can finish the rest of the work

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>