- October 14th, 2010
- Write comment
I was trying to build a Java project I got from somebody using the Eclipse Gallileo install. Since the workspaces were different, my Eclipse install was confused about the eclipse plugins jar files, and it threw the following error:
"The import org.eclipse cannot be resolved"
on line: import org.eclipse.core.runtime.Plugin
and other cryptic errors: "BundleContext cannot be resolved to a type"
I resolved this by adding the appropriate jar library files from my eclipse directory. Here’s how I searched which files I needed.
- Go to eclipse plugins:
- For each suspecting jar, I do
jar -tvf filename.jar | grep "searchingforthisClass"
- In the end I found my Plugin class:
jar -tvf org.eclipse.core.runtime_3.5.0.v20090525.jar | grep Plugin
- Right click on the project in Eclipse, choose Properties, under Libraries tab, click “Add External JARs” button, then just locate that jar that you found above.
PS: This is more of a reference for myself than for other Java developers, because this is probably as basic as it gets.