Change formatting of JavaCheck

This commit is contained in:
icelimetea 2022-06-12 16:29:39 +01:00
parent c4f2e3a955
commit 63b69c0b0c
No known key found for this signature in database
GPG Key ID: 206D220EAB0F313F

View File

@ -1,24 +1,25 @@
import java.lang.Integer; public final class JavaCheck {
public class JavaCheck private static final String[] CHECKED_PROPERTIES = new String[] {
{ "os.arch",
private static final String[] keys = {"os.arch", "java.version", "java.vendor"}; "java.version",
public static void main (String [] args) "java.vendor"
{ };
int ret = 0;
for(String key : keys) public static void main(String[] args) {
{ int returnCode = 0;
for (String key : CHECKED_PROPERTIES) {
String property = System.getProperty(key); String property = System.getProperty(key);
if(property != null)
{ if (property != null) {
System.out.println(key + "=" + property); System.out.println(key + "=" + property);
} } else {
else returnCode = 1;
{
ret = 1;
} }
} }
System.exit(ret); System.exit(returnCode);
} }
} }