import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class SystemInfo {
public static void main(String[] args) {
String command = "uname";
try {
Process process = new ProcessBuilder(command).start();
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
System.out.println(line);
}
reader.close();
process.waitFor();
} catch (IOException | InterruptedException e) {
System.err.println("Error executing command: " + command);
}
}
}
/*
run:
Linux
*/