forked from I2P_Developers/i2p.i2p
Update version warnings
Add OpenJDK check for ARM Uncomment SystemVersion.main()
This commit is contained in:
@ -37,7 +37,7 @@ public class CommandLine {
|
||||
"net.i2p.util.PartialEepGet",
|
||||
"net.i2p.util.ShellCommand",
|
||||
"net.i2p.util.SSLEepGet",
|
||||
//"net.i2p.util.SystemVersion",
|
||||
"net.i2p.util.SystemVersion",
|
||||
"net.i2p.util.TranslateReader",
|
||||
"net.i2p.util.ZipFileComment"
|
||||
});
|
||||
|
@ -26,6 +26,7 @@ public abstract class SystemVersion {
|
||||
private static final boolean _isAndroid;
|
||||
private static final boolean _isApache;
|
||||
private static final boolean _isGNU;
|
||||
private static final boolean _isOpenJDK;
|
||||
private static final boolean _is64;
|
||||
private static final boolean _hasWrapper = System.getProperty("wrapper.version") != null;
|
||||
|
||||
@ -53,6 +54,8 @@ public abstract class SystemVersion {
|
||||
_isApache = vendor.startsWith("Apache");
|
||||
_isGNU = vendor.startsWith("GNU Classpath") || // JamVM
|
||||
vendor.startsWith("Free Software Foundation"); // gij
|
||||
String runtime = System.getProperty("java.runtime.name");
|
||||
_isOpenJDK = runtime != null && runtime.contains("OpenJDK");
|
||||
|
||||
int sdk = 0;
|
||||
if (_isAndroid) {
|
||||
@ -110,6 +113,13 @@ public abstract class SystemVersion {
|
||||
return _isGentoo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.26
|
||||
*/
|
||||
public static boolean isOpenJDK() {
|
||||
return _isOpenJDK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.8
|
||||
*/
|
||||
@ -238,7 +248,6 @@ public abstract class SystemVersion {
|
||||
/**
|
||||
* @since 0.9.24
|
||||
*/
|
||||
/****
|
||||
public static void main(String[] args) {
|
||||
System.out.println("64 bit : " + is64Bit());
|
||||
System.out.println("Java 6 : " + isJava6());
|
||||
@ -253,11 +262,11 @@ public abstract class SystemVersion {
|
||||
System.out.println("Mac : " + isMac());
|
||||
System.out.println("Gentoo : " + isGentoo());
|
||||
System.out.println("GNU : " + isGNU());
|
||||
System.out.println("OpenJDK : " + isOpenJDK());
|
||||
System.out.println("Windows : " + isWindows());
|
||||
System.out.println("Wrapper : " + hasWrapper());
|
||||
System.out.println("x86 : " + isX86());
|
||||
System.out.println("Max mem : " + getMaxMemory());
|
||||
|
||||
}
|
||||
****/
|
||||
}
|
||||
|
Reference in New Issue
Block a user