Maven – Get source code for Jar

In Maven, you can get source code for project dependencies in most IDEs like this : $ mvn dependency:sources $ mvn dependency:resolve -Dclassifier=javadoc Get source code for Jar Get javadoc for Jar, normally, developers don’t provide this. 1. Eclipse IDE In Eclipse IDE, it’s better to use the maven eclipse plugin: $ mvn eclipse:eclipse -DdownloadSources=true …

Read more

Eclipse – How to attach JDK source code

This article shows you how to attach the JDK source code in Eclipse IDE. In Eclipse, select Windows -> Preferences -> Java -> Installed JREs , expands rt.jar, select “Source attachment” and find the src.zip from your disk drive. P.S JDK source code is inside the src.zip. Note You may interest at this article – …

Read more

Where to download Java JDK source code ?

The JDK source code is inside the src.zip, this article shows you how to get it on Windows, Ubuntu (Linux) and Mac OSX. 1. Windows In Windows, visit the Oracle website and download the JDK (not JRE). Install the JDK and the src.zip is inside the JDK installed folder, for example : C:\Program Files\Java\jdk1.7.0_40\src.zip 2. …

Read more

Download JDK Source code for Mac OS X

The JDK source code is packaged in a src.jar, and should be in the JDK/Home folder. However, some JDK versions in Mac OSX didn’t include the source code or Javadoc. Try find it : sudo find / -name src.jar If you couldn’t find the src.jar, then get it from Apple developer website. 1. Download from …

Read more

Attach Android source code to Eclipse IDE

By default, Android SDK or Eclipse ADT plugin are not bundle with any Android’s source code for debugging. In Eclipse IDE, step into any Android class will prompt no source code attach, see following screen : Solution According to this official Android source code article, it’s shocked that we need to use “repo” to download …

Read more

Generate source code jar for Maven based project

The “maven-source” plugin is used to pack your source code and deploy along with your project. This is extremely useful, for developers who use your deployed project and also want to attach your source code for debugging. 1. Maven Source Plugin Add maven-source-plugin in your pom.xml file. pom.xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> …

Read more

How to convert Java source code to HTML page

Java2HTML is a tool to converts Java source code into a colorized and browsable HTML page, and the steps are quite straight forward. Steps to convert it 1) Download Java2HTML – http://www.java2html.com/download.html 2) Unzip it , e.g “D:\Java2HTML” 3) Edit the “j2h.bat” file and modify the CLASSPATH variable. Make sure it point to the correct …

Read more

Where to download SWT Source Code?

The Standard Widget Toolkit (SWT) is an open source project. However Eclipse SWT plugin does not bundle with SWT source code. We have to manually download it ~ Here is the steps to download the SWT Source Code 1) Visit the Standard Widget Toolkit (SWT) Official Website http://www.eclipse.org/swt/ 2) Under Stable, select your operating system …

Read more