2022-06-12 16:29:39 +01:00
|
|
|
public final class JavaCheck {
|
2023-08-14 17:16:53 +01:00
|
|
|
private static final String[] CHECKED_PROPERTIES = new String[] {"os.arch", "java.version", "java.vendor"};
|
2022-06-12 16:29:39 +01:00
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
int returnCode = 0;
|
|
|
|
|
|
|
|
for (String key : CHECKED_PROPERTIES) {
|
2018-07-15 13:51:05 +01:00
|
|
|
String property = System.getProperty(key);
|
2022-06-12 16:29:39 +01:00
|
|
|
|
|
|
|
if (property != null) {
|
2018-07-15 13:51:05 +01:00
|
|
|
System.out.println(key + "=" + property);
|
2022-06-12 16:29:39 +01:00
|
|
|
} else {
|
|
|
|
returnCode = 1;
|
2018-07-15 13:51:05 +01:00
|
|
|
}
|
|
|
|
}
|
2022-06-12 16:29:39 +01:00
|
|
|
|
|
|
|
System.exit(returnCode);
|
2018-07-15 13:51:05 +01:00
|
|
|
}
|
2013-11-24 05:36:16 +00:00
|
|
|
}
|