Skip to content

Commit 6c56da1

Browse files
small program to find machine info
1 parent aa5f364 commit 6c56da1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package sporadic;
2+
3+
public class ProgramToFindMachineInfo {
4+
public static void main(String[] args) {
5+
String nameOS = "os.name";
6+
String VersionOS = "os.version";
7+
String architectureOS = "os.arch";
8+
System.out.println("Info about processor");
9+
System.out.println("NUMBER_OF_PROCESSORS: " + System.getenv("NUMBER_OF_PROCESSORS"));
10+
System.out.println("Processor MANIFACTURESR: " + System.getenv("PROCESSOR_INDENTIFIER"));
11+
System.out.print("Info about OS:\t");
12+
System.out.print("\tname of os:" + System.getProperty(nameOS));
13+
System.out.print("\tversion os:" + System.getProperty(VersionOS));
14+
System.out.print("\tarch of OS:" + System.getProperty(architectureOS) + "\n");
15+
16+
System.out.println("System.getProperties() are: " + System.getProperties() + "\n");
17+
System.out.println("System.getenv() are: " + System.getenv() + "\n");
18+
System.out.println("System.getSecurityManager() are: " + System.getSecurityManager() + "\n");
19+
20+
}
21+
}

0 commit comments

Comments
 (0)