Re: Compile Date



Zig wrote:

You should be able to get the lastmodified information for the .class file from the filesystem. A jar utility should preserve the modification date for each file in the archive. So:

public static Date getCompileTime(Class<?> cls) throws IOException

This seems to work from within NetBeans and as a seperate jar run from the command line.

$ java -jar GenericOverrideTest.jar
Found class genericoverridetest.Main at jar:file:/C:/Users/Dev/misc/GenericOverrideTest/dist/GenericOverrideTest.jar!/genericoverridetest/Main.class
Wed Jul 30 21:07:21 PDT 2008


init:
deps-jar:
compile:
run:
Found class genericoverridetest.Main at file:/C:/Users/Dev/misc/GenericOverrideTest/build/classes/genericoverridetest/Main.class
Wed Jul 30 21:07:21 PDT 2008
BUILD SUCCESSFUL (total time: 0 seconds)


Nice!
.