Eclipse - JAR creation failed "Class files on classpath not found or not accessible for..."

Just do a clean and/or rebuild on the project.

You can find it under the Project menu of Eclipse.


I also had a different, degenerate case of this problem. Turned out, we had a class in our project that had a file (so Eclipse kept it on the classpath) but no actual class defined in the file (the file only had imports and a class comment... probably a merge gone wrong). Anyway, deleting the file solved the issue.


It’s quite hateful that Eclipse always generates hidden files .project and .classpath in project folder. Sometimes you’re not aware if something goes wrong in these files.

After upgrading your Eclipse and if you found the following compile error, I’d suggest you to check .classpath in your project folder.

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project

Most likely you would see a line like this.

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/    org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2re1.4.2_03"/>

The stupid Eclipse appended this for no reason. Just simply remove it to make it work again. ;)

/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2re1.4.2_xx

Source: http://hochit.com/2006/07/06/eclipse-upgrading-problem-javalangobject-not-found/

In addition, you can check your project settings in eclipse. Right click on your project and choose properties. Go to Java Build Path and there should be more specific information of the problem. Most likely you set the JDK to an Version which doesn't exist on the new System.

If this doesn't help too, select your project and then use the menu entry Source->Clean Up.