Skip to content

Info Classes

Jonato edited this page Feb 27, 2016 · 1 revision

With the Info classes you can quickly get system informations from system properties.

System.out.println("INFOS");

System.out.println("System has min Java7: " + CurrentSystem.hasJavaVersion(CurrentSystem.JAVA_VERSION.JAVA7));
System.out.println("System has min Java8: " + CurrentSystem.hasJavaVersion(CurrentSystem.JAVA_VERSION.JAVA8));
System.out.println("System has min Java9: " + CurrentSystem.hasJavaVersion(CurrentSystem.JAVA_VERSION.JAVA9));
System.out.println("JAVA Home: " + CurrentSystem.getJavaHome());
System.out.println("JAVA Version: " + CurrentSystem.getJavaVersion());

System.out.println("OS: " + OS.getOsName());
System.out.println("Version: " + OS.getVersion());

System.out.println("Username: " + CurrentUser.getUsername());
System.out.println("Userhome: " + CurrentUser.getUserhome());
System.out.println("Country: " + CurrentUser.getCountry());
System.out.println("Language: " + CurrentUser.getLanguage());
Clone this wiki locally