tags:

views:

48

answers:

3

After I clean a project in eclipse I don't see the class files generated in the output folder "bin" although there's no build error, what can I do to make it regenerate the class files?

thanks

A: 

Under the "Project" menu, see if the option "Build Automatically" is checked.

Edit: Have you checked this on Eclipse or on a file browser? Sometimes Eclipse takes a long time to refresh changes in the file system. Force a refresh by right clicking the bin folder and clicking on "Refresh" on the contextual menu.

Edit: Check your build path, try reconfiguring it from scratch, I don't know if this can help, but who knows...

Fernando
yes it is, I tried unchecking and checking again, but still nothing.
Noona
I checked on the filesystem.
Noona
That's odd, there might be something wrong with your Eclipse installation. What JRE are you using?
Fernando
I downloaded Java SE development Kit 6, which had JRE bundled with it I think.
Noona
+1  A: 

Make sure you have Build Automatically option turned on as shown:

alt text

ring bearer
Try force building by clicking "Build All"
ring bearer
already tried, but still nothing. it already happened with me before and what helped is waiting an indefinite amount of time till it regenerates them again, but I need them to be regenerated without delay.
Noona
That is strange. Edit one of the source files in your projects and save. (add a blank line for example) and see if it generates .class files.
ring bearer
+1  A: 

It might be that your project is configured to write classes to somewhere other than ./bin

dty
at first it was configured to do so, but I changed the classpath to include bin.
Noona
Huh? The classpath has got nothing to do with where the classes are written (at least not explicitly - the project will automatically include its "output directory" on its classpath). If you've explicitly added bin to your classpath, this might be what is confusing it?
dty
when you create a project in eclipse a .classpath file is generated. it includes the source and output paths, and yes I added it manually.
Noona
I know; I'm an Eclipse user. Having to futz with that file manual sounds fishy to me. I've been using Eclipse since 1.0 and have probably hand-edited that file, like, twice in that time. See if re-creating the project helps. (i.e. backup your .project and .classpath, remove the project from Eclipse, delete the .project and .classpath files from disk, and re-import the project into Eclipse)
dty
Yeah at the end that was what I did, wasn't worth spending all the time figuring out what was wrong.
Noona