facebook

cant compile to local classes subdirectory

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #264861 Reply

    bobcoss
    Member

    I have my web project set up with /src /test /classes subdirectories. Eclipse used to automatically compile my files when I saved a change, and the class files were placed in the /classes subdirectoy according to the package. I recently went to run some junit tests under /test, and got a class not found exception. When I looked in the classes subdirectory, the test class files wern’t there.

    – Using ME 5.1GA, Eclipse 3.2.1 Windows XP SP2.
    – I have the project set to Build Automatically.
    – I have the Java Build Path setup with both the /src and /test subdirectories. The Default Output folder is specified as /baseproj/classes. The “Allow output folders for source folders” is not checked.

    I run a clean, and I see it bulding, but it doesn’t look like it is compiling.

    Anyone have any ideas as to what might be wrong?

    Thank you,

    Bob

    #264868 Reply

    Riyad Kalla
    Member

    Well that is odd… your settings sound right. Maybe your project state is stale, try right clicking on the root of the project, doing a refresh, then try cleaning. Did that work?

    #264904 Reply

    bobcoss
    Member

    I tried refreshing the project and doing a clean again. The weird thing is that I can see it doing the build and appying all the builders except the compile.

    Another thing I tried was to create a new web project and modify it so that it has a similar structure, and it is compiling to the /classes just fine whenever I save. This one is driving me nuts!

    If you have any ideas, I would appreciate them.

    Bob

    #264908 Reply

    Riyad Kalla
    Member

    Bob,
    Check your “Builders” properties under your project properties. I don’t know why the Java builder would be unchecked, but make sure it’s not. The you can manually check your .project file to see if the builders and nature are there properly, and also your .classpath to see how things look there.

    If worse comes to worse… open both those projects (the broken one and new one) and grab all the dot-files, select them and do a Compare -> To Eachother, and see what’s different.

    If there are no differences, this could be some flaky setting in the workspace somewhere munging this up.

    #265076 Reply

    bobcoss
    Member

    I compared all the settings as you suggested, and I never was able to get a compile to work in the original workspace. I finally created a new workspace, and checked out the project from CVS, and everything worked. It sure wasted a lot of time.

    Thank you for the suggestions.

    Bob

    #265077 Reply

    Riyad Kalla
    Member

    Bob,
    That sure is frustrating, but I’m glad it’s working now. Thank you for following up.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: cant compile to local classes subdirectory

You must be logged in to post in the forum log in