Benx Blog

六月 21, 2007

Diigo Diary 06/20/2007

Filed under: Diigo Diary — benxshen @ 8:34 上午

Bertrand’s weblog: When was this Java class compiled?  Annotated

  • 如何知道類別被 compile 的時間呢?… check it out!
     – post by benxshen

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);
  }
}

    [ 永遠的UNIX > Apache 重寫規則的常見應用 (rewrite) ]

      mod_rewrite Cookbook – FrontPage

        發表迴響 »

        仍無迴響。

        RSS feed for comments on this post. TrackBack URI

        發表迴響

        在下方填入你的資料或按右方圖示以社群網站登入:

        WordPress.com Logo

        You are commenting using your WordPress.com account. Log Out / 變更 )

        Twitter picture

        You are commenting using your Twitter account. Log Out / 變更 )

        Facebook照片

        You are commenting using your Facebook account. Log Out / 變更 )

        Google+ photo

        You are commenting using your Google+ account. Log Out / 變更 )

        連結到 %s

        在 WordPress.com 建立免費網站或網誌.

        %d 位部落客按了讚: