• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar files in Eclipse

 
Richard Ellison
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
During the debugging process using the Eclipse IDE,is there a way for me to look at the code in the relevant jar files(which are in the lib folder).
I know that the class files could be decompiled.But can Eclipse automatically show me the code while debugging?

I look forward to hearing from you.

Thanks
Richard
 
Praveen Rajendran
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Richard,
I am not sure which jar files you are mentioning(custom built or external). If those are custom jar files built by you and you have the source for them in same workspace of Eclipse then you can achieve what you were asking.

I guess it can do that by configure the project reference to the source project of the library(jar) in your workspace. This would mean that instead of using the jar file you are directly referencing to the source of the jar file.

But if you are mentioning about 3rd party jar files for which you do not have source then i guess its not possible to open it up unless you decompile it as you mentioned.

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the project's Properties, go to Java Build Path and select the Libraries tab. Expand and if the library entries by clicking the icon in front of the library name. You will be presented with several items, one of which is labeled Source Attachment. Select that and click Edit. A dialog will appear letting you attach either a JAR file containing the source or a directory containing the source.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard Ellison wrote:Hello,
During the debugging process using the Eclipse IDE,is there a way for me to look at the code in the relevant jar files(which are in the lib folder).
I know that the class files could be decompiled.But can Eclipse automatically show me the code while debugging?

Thanks
Richard


I experimented with the plugin jadclipse and reviewed it.

It uses the JAD decompiler to decompile and integrates with Eclipse so that it will "automatically" show you the code while debugging.
 
Richard Ellison
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your recommendations.

Regards
Richard
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic