如何将eclipse jdt jar库放在Java Build Path中? [英] How to put eclipse jdt jar libraries in Java Build Path?

查看:164
本文介绍了如何将eclipse jdt jar库放在Java Build Path中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



试图使用eclipse jdt ,我试图在java源文件中导入相关的模块。



我有一堆错误,因为jdt库不在Java Build Path中。





我试图打开添加Libary - >插件依赖关系,但它没有jdt jar文件。





我可以使用添加外部JAR 来指向所有的jar文件,但我认为这不是一个好主意,考虑到我有用新的项目一遍又一遍地做同样的事情。在这种情况下,如何将eclipse jdt jar库放在Java Build Path中?



自动找到 java.util.Collection 。我想可能会有一些简单的方法来设置,以便自动找到jdt jar文件。

解决方案

通常,我不得不使用eclipse插件,用于使用jdt访问工作区中的文件,并获取jar文件等。



但是,我发现这个解决方案对于使用jdt / ask非常有用。这个想法是使用字符串作为jet的输入,并导入使用jdt API的相关jar。



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



I不得不打开配置构建路径





然后,我可以选择并导入我从站点下载的所有jar文件。 p>



现在,我已经可以使用这些库了。




I'm trying to use eclipse jdt, and I tried to import related modules in java source file.

I have a bunch of errors as the jdt libraries are not in Java Build Path.

I tried to open Add Libary -> Plug-in Dependencies, but it doesn't have the jdt jar files.

I could use Add External JARs to point to all the jar files, but I don't think it's a good idea considering I have to do the same thing over and over again with new projects.

In this case, how to put eclipse jdt jar libraries in Java Build Path? The java.util.Collection is found automatically. I guess there might be some easy way to setup so that jdt jar files are found automatically.

解决方案

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.

这篇关于如何将eclipse jdt jar库放在Java Build Path中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆