File: JavaInfo.java

package info (click to toggle)
java-atk-wrapper 0.30.4-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,980 kB
  • sloc: sh: 8,957; ansic: 4,715; java: 1,467; makefile: 66
file content (16 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public class JavaInfo {
	public JavaInfo() {
		String strHome = System.getProperty("java.home");
		String fileSep = System.getProperty ("file.separator");
		if (strHome.endsWith( fileSep + "jre" )) {
			strHome = strHome.substring(0, strHome.length()-4);
		}

		System.out.println(strHome);
	}

	public static void main(String args[]) {
		new JavaInfo();
	}
}