I have a jar file that contains source code. How can I browse this source code in Eclipse?
At the moment, my Eclipse opens the jar file in a Text Editor, and it isn't that helpful.
When I look in the preferences "General" > "Editors" > "File Associations" I have no associations for *.jar
and if I look in the available "Editors" I can't find anyone that seem to be a good fit for jar files.
How can I browse the source code in a jar file using Eclipse? Is there any Editor I should configure for jar files?
If you have the jar added to a project's classpath, you can view its source by:
Referenced Libraries
in the Package Explorer
viewYou need both the .class and .java file in the jar to view source, though.
If you have only the .java file, the class won't appear at all.
If you have only the .class file, the class will appear as bytecode.
Example:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With