aboutsummaryrefslogtreecommitdiff
path: root/libraries/javacheck/JavaCheck.java
blob: 4bf43a5445c5e48674003f4508908369ebe585d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public final class JavaCheck {

    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) {
            String property = System.getProperty(key);

            if (property != null) {
                System.out.println(key + "=" + property);
            } else {
                returnCode = 1;
            }
        }

        System.exit(returnCode);
    }

}