views:

54

answers:

2

Per this question (see comments near the bottom), I was wondering if anyone knows any way to get Eclipse to store .class files in a folder of my choosing outside the project folder where the .java source files are stored. I have not seen an option to do this in the new project creation wizard, but my knowledge of Eclipse is quite limited. Thanks!

+3  A: 

Right click on the project; choose "Java Build Path"; select the "Source" tab. At the bottom is a field where you can specify. By default I thought it was ${project}/bin

Of course now I see that you said OUTSIDE the project path.

danpaq
+1  A: 

If your Dropbox folder was outside of your Eclipse project you could link the source folder into Eclipse so that the class files would be maintained inside of Eclipse, but the source in your Dropbox folder would get your changes as well. Right click on the project select "Build Path", then "Link Source..."

This assumes you don't care about any of the other files associated with an Eclipse project (.classpath, .project, etc...).

David Coutu
Could you please explain--this will make Eclipse look to a different folder (which I can specify as on my DropBox) for the .java source files, but continue to keep everything else in the project folder (which I can specify as local)? If so, supposing I and a partner both do this--so we have a shared dropbox source and separate local project folders--should things work when source files are recompiled? This seems like a good idea if I understand it correctly.
Philip
I'm not familiar with Dropbox, but if I modify a file outside of Eclipse and then open it in Eclipse I'll see the updates, and vice versa. If it was already opened and I click on it I'm prompted to refresh the contents. So it seems like it will work for keeping the class files separate.As for it being a good idea...I'm not sure if Dropbox will really fit the bill of replacing a version control tool, but good luck with it and I'd love to see how it compares for you.
David Coutu