How to get lastModified time of a file within a jar file on the classpath?
Location: http://www.jguru.com/faq/view.jsp?EID=773187 Created: Feb 26, 2002 Author: Jens Dibbern (http://www.jguru.com/guru/viewbio.jsp?EID=9896) Question originally posed by Alan Gault (http://www.jguru.com/guru/viewbio.jsp?EID=131380 If you know the jar file, you can open it as a java.util.jar.JarFile object and use getJarEntry to retrieve the file in question as a java.util.jar.JarEntry object. After that you can call getTime. If you do not know the jar file, you have to get the classpath by String classPath = System.getProperty(“java.class.path”); and try every jar file included. Sorry about the last bit – I know it looks quite clumsy.