File: JavaInfo.java

package info (click to toggle)
java-atk-wrapper 0.38.0-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,572 kB
  • sloc: ansic: 5,503; sh: 4,364; java: 2,155; makefile: 100
file content (15 lines) | stat: -rw-r--r-- 299 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public class JavaInfo {
	public JavaInfo() {
		String strHome = System.getProperty("java.home");
		if (strHome.endsWith( "/" + "jre" )) {
			strHome = strHome.substring(0, strHome.length()-4);
		}

		System.out.println(strHome);
	}

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