views:

536

answers:

4

Hi,

I have a large project in my workspace. Each time I save a jsp or any file (java, txt, properties etc.) the build runs. It takes about 30 to 45 secs to build. I hate it! I can't be productive like this. This just started happening recently, I've always had auto build enabled which didn't cause this issue. Other people here in the office do not get this problem. So it must be my settings.

I guess the questions is, how do I get eclipse to build only the class file that I modified and not a complete build each time I edit any file in the project?

Please help!

~Jay

+3  A: 

I guess the questions is, how do I get eclipse to build only the class file that I modified and not a complete build each time I edit any file in the project?

That is what Eclipse usually does out-of-the-box. You must have broken something...

Are you using external build tools (such as Ant)? Check the Builders settings for the project.

If nothing else helps, try to create a new workspace and import your project into it.

Thilo
A: 

I don't use Eclipse (so consider this an semi-uneducated guess :-), but another thing to check is your clock settings. It could be that you have your time set too far away from the file modification time so it keeps thinking that the source files have changed in relation to the class files.

I'd say that this is highly unlikely, but, depending on how Eclipse works in might be possible.

The other thing is are you sure that the file you are changing really doesn't require that the other files get rebuilt too?

TofuBeer
+1  A: 

As Thilo said, check your builders.

A last resort would be to delete your workspace and check out a clean set of code. This is more or less annoying depending on how easy or hard it is to get your codebase from "checked out" to "running" and how much you customise your Eclipse experience (modified shortcuts / views / perspectives, mylyn data etc).

SCdF
+2  A: 

It turns out that I did not have all my jars in the classpath. These jars were not being directly used by my codes hence there were no errors in my codes per se. They were needed by the other libraries that I was using.

FIX: Made sure all dependencies are added to classpath.

Jay Q.
Had the same problem - and so frustrating. Added all my jars again (something must have been missing) and problem was fixed. Thanks.
Richard Dorman
Same here. We have a rather large project and old computers, so I was loosing several minutes on each save! I checked the list of errors of the project and found out that org.junit wasn't resolved. Added the jar and it went fine... Many thanks! (Note: seen on Helios - and the behavior should be more friendly...)
PhiLho