what are the steps to add source code of Javamail API in my project so that i can see javamail classes easily by clicking on its class from my project. I am using eclipse
2 Answers
Welcome to Stack overflow.
There are basically two methods of doing this.
Method 1: The 'Easy' way.
You use Maven, If your project is a maven project. include the dependency for javamail. Right click on your project and select Maven > Download Sources
this should basically download the Source files for all your dependencies.
Method 2: The 'Hard' Way
Go to this link and download your Javamail 1.5 jar. and This link to download your Javamail 1.5 source jar. Next step, Right click on your Project, select Properties. Select Java Build Path, Click the Libraries Tab and Click Add external Jars.
Browse to the location of your library and Add it. Expand the javamail library.
Click Source attachment and click the Edit button.
Browse to the location of your source zip file and add it.
You should now be able to see your Source javadocs, Control Clicking on a Javamail Class, should take you to the source Class as well.
easy way to attach source to any jar file http://javarevisited.blogspot.in/2012/12/how-to-attach-source-in-eclipse-Jar-JDK-debugging.html