Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use eclipse JDT plugin

I installed JDT plugin (I'm running Eclipse 4.2.1) but Eclipse doesn't recognize some types and classes. For example I got "CompilationUnit cannot be resolved to a type". Do I have to import something Eclipse doesn't suggest?

like image 337
user1847118 Avatar asked Jan 19 '26 12:01

user1847118


1 Answers

If you are trying to use the JDT libraries in an eclipse plugin project, you will have to add the org.eclipse.jdt.core to the plugin dependencies (in the plugin.xml file).

Else if you are trying to add these to a java application, then you will need to add these to the build path.

Right click on the project and select Properties > Build Path > Add External JARs

Here just add the jdt libraries from the Eclipse plugins directory.

like image 175
Unni Kris Avatar answered Jan 21 '26 00:01

Unni Kris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!