Importing a library into Eclipse
I want to use Lucene in my project. When I simply copy the .jar file into my project than I get the error "Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found." How do I import a library like Lucene the right way in Eclipse?开发者_StackOverflow
You have imported it correct. You can use all the classes from the jar if you are that far. You can't display all the useful hints from the javadoc during editing and you can't jump into the code of the library.
You can add the source and the javadoc later on in your projects build path settings.
- Right click on your project and select Properties
- Choose Java Build Path
- Now select Libraries (you should see the jar listed)
- Click on the arrow of the library to expand its settings (You should see something like JavaDoc none and source attachment none)
- Now if you want to add the source click on the source attachment none item and select edit.
- Now supply the path information to the folder or the jar containing the source and click okay.
- Do the same thing for the java doc
精彩评论