I generated my package mypackage.jar and mypackage-javadoc.jar.
And then I followed instruction here.
I created mypackage.jar.properties and inside
doc=docs/mypackage-javadoc.jar
now I placed my package in libs and javadoc jar file into libs/docs/
and then when I import mypackage.jar into my project.
it still says 'This element neither has attached source nor attached Javadoc and hence no Javadoc could be found'.
Is there anyway to sync javadoc with my class files automatically when I just import mypackage.jar?
Yo don't need a properties file. Make sure your JAR is added to the classpath of the project (Right click, Properties, Java Build Path). Then you should see your Jar under the project's node in the tree with a little jar icon next to it. Right-click on it, properties and there is a GUI for setting the Javadoc location.
Click on Javadoc location and then Edit...
Enter the path to your javadoc JAR.