Java ビルドタイムスタンプを得る
ナビゲーションに移動
検索に移動
Java ビルドタイムスタンプを得る
Java |
- SimpleDateFormat df = (SimpleDateFormat) SimpleDateFormat.getInstance();
- df.applyPattern("yyyyMMddHHmmssSSS");
- String timestamp =
- df.format(new Date(new File(getClass()
- .getClassLoader()
- .getResource(getClass().getCanonicalName().replace('.', '/') + ".class")
- .toURI()).lastModified()));
- return timestamp;
© 2006 矢木浩人