| Author |
To Check the Source file
|
vitthal wable
Greenhorn
Joined: Sep 09, 2006
Posts: 16
|
|
hii Friends, Here I want to know that ; suppose i have .java file and after compilation class file is generated for .java file In this case suppose i want to check that whether java file is changed after compilation, I know that there is command for java Interpreter but i forget it if anyone is aware of that please reply
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
Check whether the Java file is changed? Check what? Maybe you mean check whether the Java file is newer than the class file? You'd just use the operating system's last modified time for the two files. If you're doing this in Java, the java.io.File class has a method to check this; otherwise, "ls -l" or "dir" will do the trick.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Srinivas Kalvala
Ranch Hand
Joined: Oct 20, 2005
Posts: 257
|
|
Hello, Exactly. That what ANT will do. It checks the time stamp .class file with .java file. if the timestamps are diffe then new compilation for that file will be made. if some one make touch of the .class file then .... ? it recompiles again.
|
 |
 |
|
|
subject: To Check the Source file
|
|
|