why filed updates by elipse cannot be detected by ant

D

david wolf

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
 
O

Oliver Wong

david wolf said:
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?

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
 
F

Frank Seidinger

david said:
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
 
D

david wolf

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?
 
O

Oliver Wong

david wolf said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top