pollymc/libraries/javacheck/JavaCheck.java

26 lines
579 B
Java
Raw Permalink Normal View History

2022-06-12 20:59:39 +05:30
public final class JavaCheck {
2022-06-12 20:59:39 +05:30
private static final String[] CHECKED_PROPERTIES = new String[] {
"os.arch",
"java.version",
"java.vendor"
};
public static void main(String[] args) {
int returnCode = 0;
for (String key : CHECKED_PROPERTIES) {
2018-07-15 18:21:05 +05:30
String property = System.getProperty(key);
2022-06-12 20:59:39 +05:30
if (property != null) {
2018-07-15 18:21:05 +05:30
System.out.println(key + "=" + property);
2022-06-12 20:59:39 +05:30
} else {
returnCode = 1;
2018-07-15 18:21:05 +05:30
}
}
2022-06-12 20:59:39 +05:30
System.exit(returnCode);
2018-07-15 18:21:05 +05:30
}
2022-06-12 20:59:39 +05:30
}