Open source libraries are very popular in Java world. Nowadays Java/J2EE/Android developers often work with Java-based projects which using a lot of open source Java libraries. One issue with using open source Java libraries is how to find documentation/source code for these open source libraries fast and easily? It is tedious and time consuming to search for the source code, download and attach source code packages to the libraries. If your project has 40 libraries, how long will it take to find source code for all libraries? The solution is to use this Eclipse plugin to do the task for you with only one mouse click. This Eclipse plugin will help to find source code for open source Java libraries automatically from Internet. Just right click on a Java library, choose the menu item "Attach Java Source" and wait. The source code for the library will be found and attached to the Java library in several seconds.
Note: This project is mostly useful when you don't have Maven/Gradle to mange project dependencies. If your project uses Maven/Gradle, Eclipse should support downloading source code and this plugin is not really needed.
- Use Update site URL: https://dl.bintray.com/tha/eclipserepo/
- Or download offline: download plugin from https://dl.bintray.com/tha/eclipserepo/plugins/org.freejava.javasourceat... and save it to eclipse/dropins/ folder
Bug Report: https://github.com/tha2015/free-plugins/issues
Note for Android developers: - When programming Android projects using Google ADT plugin, the jar files inside libs folder will be added as libraries automatically but Eclipse will not allow change source code path for these libraries. This plugin can attach source code for Android libraries and will help Android developers in coding / debugging.
Usage: Right click on a Java library of a Java-based project and choose the menu item "Attach Java Source" and wait for the source code to be downloaded/attached to the library automatically (you will see a background job is running on Eclipse status bar).
- Find source code for Java libraries using all popular Java repositories on Internet (Like Maven Central repository, Nexus-based repositories, Eclipse P2 repositories, ...)
- Eclipse plugin developers can use this plugin to find source code for Eclipse plugins using Eclipse P2 repository.
- (NEW) Support attaching source code for rt.jar (i.e. Oracle JRE 7 or JRE 8). Please provide feedback for this feature.
- The plugin also uses a special cloud-based search service designed for the plugin. This search service contains information about all Apache Java projects. This means source code for any Apache Java-based library will be found.
- If source code for a Java library cannot be found, the user can help the community by providing the URL to the source code archive file (in Zip or Jar file format) or SCM URL (see below note) and the source code will be found next time! You are helping youself and others when providing information about source code for a library!
Compatibility: Tested with Eclipse 3.5 to 3.8 (but should also work with 4.x).
Requirements: - JDK 6+ - Eclipse 3.5+ - An Internet connection (to search and download source code)
SCM URL format (used when you provide source code location from SCM systems): The SCM URL will follow the format supported at http://maven.apache.org/scm/scm-url-format.html with option fragment to indicate version as below. Various SCM types are supported (Git SVN CVS Mercurial ...).
You might also like the plugins:
- Java Examples Search to find example code from Eclipse.
- Java Dependency Viewer to view your class dependencies and package dependencies visually.