0

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 2

4

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 enter image description here 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. enter image description here

Browse to the location of your library and Add it. Expand the javamail library. Click Source attachment and click the Edit button. enter image description here 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.

0
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.