/**
* get date a class was compiled by looking at the corresponding class file in the jar.
* @author Zig
*/
public static Date getCompileTimeStamp( Class<?> cls ) throws IOException
{
ClassLoader loader = cls.getClassLoader();
String filename = cls.getName().replace('.', '/') + ".class";
URL resource=( loader!=null ) ?
loader.getResource( filename ) :
ClassLoader.getSystemResource( filename );
URLConnection connection = resource.openConnection();
long time = connection.getLastModified();
return( time != 0L ) ? new Date( time ) : null;
}