Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

why filed updates by elipse cannot be detected by ant

Thread view: 
david wolf - 21 Apr 2006 16:15 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?

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.