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[] keys = {"os.arch", "java.version", "java.vendor"};
public static void main (String [] args)
{
int ret = 0;
for(String key : keys)
{
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)
{
if (property != null) {
System.out.println(key + "=" + property);
}
else
{
ret = 1;
} else {
returnCode = 1;
}
}
System.exit(ret);
System.exit(returnCode);
}
}