Get operating system name and version
public class Main { public static void main(String[] args) { String name = "os.name"; String version = "os.version"; String architecture = "os.arch"; System.out.println("Name: " + System.getProperty(name)); System.out.println("Version: " + System.getProperty(version)); System.out.println("Architecture: " + System.getProperty(architecture)); } }