After I update some files in eclipse, then if I execute ant to do a
compile, the ant does not compile the updated files. Why?
But if I use other editor, say ultraedit or eaven Dos's editor to eidt
the file, ant can find the files are updated and compile these files.
This is really annoying?
What happened here, can anyone give me a direction?
Thanks,
David
Oliver Wong - 21 Apr 2006 18:04 GMT
> After I update some files in eclipse, then if I execute ant to do a
> compile, the ant does not compile the updated files. Why?
[quoted text clipped - 4 lines]
>
> What happened here, can anyone give me a direction?
What's the relationship between the file you are editing, and ant? E.g.
are you editing java source files? Ant build scripts? Something else?
- Oliver
Frank Seidinger - 21 Apr 2006 18:28 GMT
david wolf schrieb:
> After I update some files in eclipse, then if I execute ant to do a
> compile, the ant does not compile the updated files. Why?
Because eclipse by default compiles java source files imediately after
saving. Therefore the class files are up to date if you run ant afterwords.
So ant has nothing to compile.
> But if I use other editor, say ultraedit or eaven Dos's editor to eidt
> the file, ant can find the files are updated and compile these files.
> This is really annoying?
No, thats the opposite. A stupid text editor doesn't know how to compile
your classes and only stores the modified java source files. If you run ant
afterwords, it detects that the java sources are newer than the class files
and compiles them. Just like good old make.
Kind regards,
Frank

Signature
Geld allein macht nicht glücklich.
Es kommt auch auf die Menge an...
david wolf - 21 Apr 2006 19:59 GMT
Frank said is right. Thank you so much !
Another problem. The files I modified are java source files. If I made
any modification, say errors, to the java source file. Why the time
stamp of the class file also updated?
Oliver Wong - 21 Apr 2006 20:19 GMT
> Frank said is right. Thank you so much !
>
> Another problem. The files I modified are java source files. If I made
> any modification, say errors, to the java source file. Why the time
> stamp of the class file also updated?
Eclipse will compile and generate class file for sources which have
errors in them. It simply replaces the body of the methods with errors to
throw exceptions.
- Oliver