Ryu
Ryu

Reputation: 21

how to automatically remove relative class file once delete a java source file?

when i delete a souce file Test.java, rebuild the source file use javac task, the class file Test.class wont be remove automatically. is there any workaround?

Upvotes: 2

Views: 808

Answers (2)

sateesh
sateesh

Reputation: 28693

You can define ant target called clean (say) that would remove all the compiled class files. And in your ant target compile (say) specify the target clean as dependency.

Upvotes: 3

Not immediately. You usually deal with it by removing everything and recompiling.

Most IDE's do this transparently, however, so you don't have to handle this yourself. Any particular reason you are not using an IDE?

Upvotes: 1

Related Questions