Eclipse “Error: Could not find or load main class”

In your classpath you’re using an absolute path but you’ve moved the project onto a new machine with quite possibly a different file structure.

In your classpath you should therefore (and probably in general if you’re gonna bundle JARS with your project), use relative pathing:

In your .classpath change

<classpathentry kind="lib" path="C:/Users/Chris/Downloads/last.fm-bindings-0.1.1.jar" sourcepath=""/><classpathentry kind="lib" path="C:/Users/Chris/Downloads/last.fm-bindings-0.1.1.jar" sourcepath=""/>

to

<classpathentry kind="lib" path="last.fm-bindings-0.1.1.jar"/>

Leave a Comment