netbeans : add library permanently

半腔热情 提交于 2019-12-09 13:03:22

问题


I work in a group project and after every checkout
I have to remove and add the javamail api..(because the path is relative) how can i make it IN the Project folder?

This is how i add the library :

  1. right click on librarys folder
  2. Add/jar Folder..
  3. Choose the mail.jar

But when my collegue checks this out... he get's problems. How can i make the path absolute ?


回答1:


A better way to add library to Netbenas would be

Tools -> Libraries -> New Library...

After it:

Project tab -> [your project] -> Properties -> Libraries -> Add Library

This would be always "relative"




回答2:


This worked for me: Project Properties -> Libraries -> Add JAR/Folder, and in that dialog there is a "Reference as" option. Choose "Relative Path" and then locate your library.




回答3:


You might be better off using a dedicated folder for your libraries. Please see this tutorial to help doing the same. That way, the libraries can always live in their own country.



来源:https://stackoverflow.com/questions/1053680/netbeans-add-library-permanently

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!