aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ch/ethz/ssh2/Version.java
blob: fe683760270a4b266cc712e2af5eeaff10eaa83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package ch.ethz.ssh2;

/**
 * Provides version information from the manifest.
 *
 * @version $Id: Version.java 20 2011-05-28 12:32:00Z dkocher@sudo.ch $
 */
public class Version
{
	public static String getSpecification()
	{
		Package pkg = Version.class.getPackage();
		return (pkg == null) ? null : pkg.getSpecificationVersion();
	}

	public static String getImplementation()
	{
		Package pkg = Version.class.getPackage();
		return (pkg == null) ? null : pkg.getImplementationVersion();
	}

	/**
	 * A simple main method that prints the version and exits
	 */
	public static void main(String[] args)
	{
		System.out.println("Version: " + getSpecification());
		System.out.println("Implementation: " + getImplementation());
	}
}