1 23 24 package org.objectweb.clif.util; 25 26 import org.objectweb.clif.console.lib.gui.GuiAboutDialog; 27 28 import java.io.BufferedReader ; 29 import java.io.InputStreamReader ; 30 import java.io.IOException ; 31 32 33 37 public class Version 38 { 39 static public final String version_filename = "compile.timestamp"; 40 static private String timestamp; 41 42 43 static 44 { 45 BufferedReader reader = null; 46 try 47 { 48 reader = new BufferedReader ( 49 new InputStreamReader ( 50 Version.class.getClassLoader().getResourceAsStream(version_filename))); 51 timestamp = reader.readLine(); 52 } 53 catch (IOException ex) 54 { 55 ex.printStackTrace(System.err); 56 timestamp = "(unable to get compilation timestamp)"; 57 } 58 if (reader != null) 59 { 60 try 61 { 62 reader.close(); 63 } 64 catch (IOException ex) 65 { 66 ex.printStackTrace(System.err); 67 } 68 } 69 } 70 71 72 static public String getVersion() 73 { 74 return timestamp; 75 } 76 77 78 static public void main(String [] args) 79 { 80 System.out.println(timestamp); 81 } 82 } 83 | Popular Tags |