1 16 package org.mortbay.http; 17 18 19 20 30 public class Version 31 { 32 private static boolean __paranoid = 33 Boolean.getBoolean("org.mortbay.http.Version.paranoid"); 34 35 private static String __Version="Jetty/5.1"; 36 private static String __VersionImpl=__Version+".x"; 37 private static String __VersionDetail="Unknown"; 38 private static String __notice = "This application is using software from the "+ 39 __Version+ 40 " HTTP server and servlet container.\nJetty is Copyright (c) Mort Bay Consulting Pty. Ltd. (Australia) and others.\nJetty is distributed under an open source license.\nThe license and standard release of Jetty are available from http://jetty.mortbay.org\n"; 41 42 static 43 { 44 updateVersion(); 45 } 46 47 public static String getVersion() {return __Version;} 48 public static String getImplVersion() {return __VersionImpl;} 49 public static String getDetail() {return __VersionDetail;} 50 public static boolean isParanoid(){return __paranoid;} 51 52 public static void main(String [] arg) 53 { 54 System.out.println(__notice); 55 System.out.println("org.mortbay.http.Version="+__Version); 56 System.out.println("org.mortbay.http.VersionImpl="+__VersionImpl); 57 System.out.println("org.mortbay.http.VersionDetail="+__VersionDetail); 58 } 59 60 public static void updateVersion() 61 { 62 Package p = Version.class.getPackage(); 63 if (p!=null && p.getImplementationVersion()!=null) 64 __VersionImpl="Jetty/"+p.getImplementationVersion(); 65 66 if (!__paranoid) 67 { 68 __VersionDetail=__VersionImpl+ 69 " ("+System.getProperty("os.name")+ 70 "/"+System.getProperty("os.version")+ 71 " "+System.getProperty("os.arch")+ 72 " java/"+System.getProperty("java.version"); 73 } 74 } 75 } 76 77 | Popular Tags |