How to put eclipse jdt jar libraries in Java Build Path?

ⅰ亾dé卋堺 提交于 2019-12-05 13:27:29

Assuming your project is an eclipse plugin project you can add the jdt as a dependency and the jars will be automatically added to the plugin dependencies

Normally, I had to use eclipse plugin for using jdt for accessing the files in the workspace, and getting the jar files and such.

However, I found this solution to be very useful for using jdt/ask. The idea is to use string as an input to the jet, and import the related jars for using the jdt APIs.

http://www.programcreek.com/2011/01/a-complete-standalone-example-of-astparser/

I had to open Configure Build Path.

Then, I could select and import all the jar files that I downloaded from the site.

Now, I am ready to use the libraries.

In you Java Build Path screen, you notice two bottons Add Variable and Add Liberary below Add External Jars. Use those options and define a new variable or new user library; Once done, add the same in the project build path.

For newer project, you can simply reuse the variable/user library.

java.util.Collection is found as it is added as library in your build path(see first item in your screenshot). I am suggesting to do the same by introducing an User Library.

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