Ali
Ali

Reputation: 1

Importing org.eclipse.core.resources with Eclipse Java EE IDE for Web Developers.Version: Indigo Service Release 2

I am using Eclipse Java EE IDE for Web Developers (Version: Indigo Service Release 2).

For my project, I wrote the code: IResource resource= new IResource(). I added the import statement import org.eclipse.core.resources. I downloaded the org.eclipse.core.resources-3.7.101.v20120125-1505.jar and put it on my project build path and restarted eclipse, but the import cannot be resolved. I tried other version org.eclipse.core.resources-3.8.100.v20130521-2026.jar, but still did not work. I tried the solution suggested in importing org.eclipse.core packages for Eclipse plug-in, but did not help.

What do I need to do in order to get import org.eclipse.core.resources and IResource class to work for me? You help is greatly appreciated.

Upvotes: 0

Views: 687

Answers (1)

nitind
nitind

Reputation: 20003

import org.eclipse.core.resources would import a class named org.eclipse.core.resources, not the classes in that package. You would need to import org.eclipse.core.resources.*.

Even so, the plug-ins that ship as part of an Eclipse download expect to run within an Eclipse Runtime. With rare exceptions, can't just use them in a Java Application, so just adding them to your Java Build Path manually isn't constructive.

Upvotes: 1

Related Questions