Skip to main content

Benx Shen's Library tagged sample   View Popular

20 Jun 07

Bertrand's weblog: When was this Java class compiled?

  • When was this Java class compiled?



    Credits to Dmitry Beransky on the advanced-java@discuss.develop.com list.
    import java.util.Date;
    import java.io.IOException;
    public class When {
    public static void main(String args[]) throws IOException {

    Date d =
    new Date(
    When.class.getResource("When.class")
    .openConnection()
    .getLastModified()
    );

    System.out.println("This class was compiled on " + d);
    }
    }
1 - 12 of 12
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo