1

The problem must have a simple answer but I cannot get it.

I need to use the org.eclipse.core.resources and org.eclipse.core.runtime libraries with the IResources,IProject,IWorkspace,... classes. For that I have downloaded the aspectjtools.jar which contains them. I have already added the aspectjtools.jar to the project classpath in the eclipse project.

The project consists on a simple JSP page that imports the org.eclipse.core.resources and the org.eclipse.core.runtime libraries, but when I try to use for example the IWorkspace class I get an exception (IWorkspace cannot be resolved to a type) as the class IWorkspace does not exist.

I have read that another step is needed. Something about editing the aspectjtools.jar/META-INF/MANIFEST.MF, but I don't know what to write in it.

Ask for more details if needed.

AegLos
  • 157
  • 1
  • 1
  • 10
  • Not sure that classes you are looking for belongs to aspectjtools.jar. How did you import org.eclipse.core.resources and org.eclipse.core.runtime into your project? Did you just copy jars into project subdirectory and set classpath there or you used bundle dependency manager? – Viktor Stolbin Jun 27 '12 at 05:17
  • The classes belongs to aspecjtools.jar. I'm sure of that, but they are precompiled, I mean the package contains the x.class not the source. I don't know if this is important. I just have copied the jar into a subdirectoty and then I have added it to the classpath. It's the first time I have to use this kind of jar in my own project, so I'm a kind of noob. Could you explain me the steps use the bundle dependency manager if that is the solution? – AegLos Jun 27 '12 at 08:37
  • Classpath business for Eclipse project depends on its nature. What type of project have you created? Is this a plugin project, web project or simply java project? I believe you are working with web project. Try this http://stackoverflow.com/questions/5467038/adding-3rd-party-jars-to-web-inf-lib-automatically-using-eclipse-tomcat – Viktor Stolbin Jun 27 '12 at 09:18
  • Dynamic web project (JSP). The issue is about refresh the workspace, so I found that I have to use the mentioned aspecjtool.jar that contains the needed libraries. – AegLos Jun 27 '12 at 09:26
  • It worked, thank you, but I think that I had not choose the right way to do what I wanted to do, so I will make another question. – AegLos Jun 27 '12 at 11:06

1 Answers1

1

I have resolved the problem with the problem with the Viktor Stolbin answer.

  1. Put the .jar files into a project subdirectory.
  2. Add the .jar files to the classpath: Project>Properties>Java Build Path>Add Jar>Project Subdirectory of the jar files
  3. Follow the instructions in: Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat
Community
  • 1
  • 1
AegLos
  • 157
  • 1
  • 1
  • 10