Eclipse supports debugging the Rt.jar that comes with JDK

Source: Internet
Author: User

1. background

You cannot see the value of a method parameter or a local variable when eclipse is debugging code in a Rt.jar that comes with a jdk.

This is because the debug information in the code is stripped out of the official version of the JDK released by Oracle. So to debug the code in Rt.jar in your usual work, you have to recompile the rt.jar.


2. steps

  1. to Create a directory: Rt_debug (such as: F:\rt_debug )


  2. putJava_home/src.zipcopied toRt_debugand unzip, and only keepJava,javax,orgthree directories (three commonly used completely enough)


  3. put Java_home/jre/lib/rt.jar copied to Rt_debug in


  4. dos cd   f:\rt_debug


  5. dir/b/s/x *.java > Files.txt (in rt_debug directory created files.txt, Save all .java file)

  6. Create F:\rt_debug\classes Catalogue

  7. DOS medium: javac-j-xms16m-j-xmx1024m-sourcepath.-cp./rt.jar-d./classes-g @files. txt (recompile and put into the classes Directory)

  8. DOS medium: CD Classes

  9. in Dos: jar cf0 Rt_debug.jar *(re-punch the compiled file into a jar Package)

  10. Put Rt_debug.jar into Java_home/jre/lib.

  11. Select I nstalled jres in eclipse,Select the appropriate jdk, Click edit, then select click Add External jars, Select Rt_debug.jar,up to Rt.jar



Eclipse supports debugging the Rt.jar that comes with JDK

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.