• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package ch.ethz.ssh2;
2 
3 /**
4  * Provides version information from the manifest.
5  *
6  * @version $Id: Version.java 20 2011-05-28 12:32:00Z dkocher@sudo.ch $
7  */
8 public class Version
9 {
getSpecification()10 	public static String getSpecification()
11 	{
12 		Package pkg = Version.class.getPackage();
13 		return (pkg == null) ? null : pkg.getSpecificationVersion();
14 	}
15 
getImplementation()16 	public static String getImplementation()
17 	{
18 		Package pkg = Version.class.getPackage();
19 		return (pkg == null) ? null : pkg.getImplementationVersion();
20 	}
21 
22 	/**
23 	 * A simple main method that prints the version and exits
24 	 */
main(String[] args)25 	public static void main(String[] args)
26 	{
27 		System.out.println("Version: " + getSpecification());
28 		System.out.println("Implementation: " + getImplementation());
29 	}
30 }
31