Posted by: hochit | July 6, 2006

Eclipse problem - Cannot find the class file for java.lang.Object

It’s quite hateful that Eclipse always generates hidden files .project and .classpath in project folder. Sometimes you’re not awared 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

Sayed’s thoughts: Upgrading eclipse

Responses

  1. this is not the problem in my case. what further can i do to solve this prob

  2. Well, it *was* the problem in my case. Thank you!

  3. This fixed my problem as well. To be clear, the resulting string value for the path attribute should be: “org.eclipse.jdt.launching.JRE_CONTAINER/”

    Thanks!

  4. Still problem is not solved

  5. So, what’s your problem exactly?

  6. That worked for me!

    Cheers,

    //mikael

  7. For anyone found it worked or not worked, please quote your Eclipse version as well. Since I haven’t updated my Eclipse long time. I also want to know if the hack can apply to newer versions. Thanks!

  8. worked for me. I’m using 3.1.0 though.

  9. Kind Status Priority Description Resource In Folder Location
    Error The project was not built since its classpath is incomplete. Cannot find the class file for javax.xml.rpc.ServiceException. Fix the classpath then try rebuilding this project. iimsweb_rpt

  10. It has worked for me too.
    Thank you.
    (Stupid Eclipse!)

  11. Doesn’t work for me either! Using Eclipse 3.10 on Ubuntu Linux 7.10.

  12. I had the same error even though the .classpath file seemed OK. I went to project properties, Java Build Path and removed “JRE System Library” entry. Then “Replace With -> Latest from HEAD” the .classpath file. The error was gone.

Leave a response

Your response:

Categories