How to host jcl jdt jar libraries in Java Build Path?

enter image description here

I am trying to use eclipse jdt and I tried to import related modules into java source file.

I have a bunch of errors since jdt libraries are not in the Java build path.

enter image description here

I tried to open Add Libary -> Plug-in Dependencies , but it does not have jdt jar files.

enter image description here

I could use Add External JARs to point to all jar files, but I don't think this is a good idea, given that I have to do the same thing over and over with new projects.

In this case, how to host jcl jdt jar libraries in Java Build Path? java.util.Collection is located automatically. I suppose there might be some easy way to configure so that jdt jar files are found automatically.

+4
source share
3 answers

I usually had to use the eclipse plugin to use jdt to access files in the workspace and get jar files, etc.

However, I found this solution very useful for using jdt / ask. The idea is to use the string as a jet plane entry and import the associated banks to use the jdt API.

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

I had to open the Configure Build Path .

enter image description here

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

enter image description here

Now I am ready to use the libraries.

enter image description here

+1
source

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

+2
source

On the Java Build Path screen, you'll see the two bottom Add Variable and Add Liberary below Add External Jars . Use these parameters and define a new variable or a new user library; After that, add the same to the build path of the project.

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

java.util.Collection found as , it is added as a library to your build path (see the first paragraph in the screenshot). I suggest doing the same by entering User Library .

0
source

Source: https://habr.com/ru/post/1439477/


All Articles