List of usage examples for com.google.common.base StandardSystemProperty OS_ARCH
StandardSystemProperty OS_ARCH
To view the source code for com.google.common.base StandardSystemProperty OS_ARCH.
Click Source Link
From source file:com.facebook.presto.server.PrestoJvmRequirements.java
public static void verifyJvmRequirements() { String specVersion = StandardSystemProperty.JAVA_SPECIFICATION_VERSION.value(); if ((specVersion == null) || (specVersion.compareTo("1.8") < 0)) { failRequirement("Presto requires Java 1.8+ (found %s)", specVersion); }/*from w w w. j a va2 s . c o m*/ String vendor = StandardSystemProperty.JAVA_VENDOR.value(); if (!"Oracle Corporation".equals(vendor)) { failRequirement("Presto requires an Oracle or OpenJDK JVM (found %s)", vendor); } String dataModel = System.getProperty("sun.arch.data.model"); if (!"64".equals(dataModel)) { failRequirement("Presto requires a 64-bit JVM (found %s)", dataModel); } String osName = StandardSystemProperty.OS_NAME.value(); String osArch = StandardSystemProperty.OS_ARCH.value(); if ("Linux".equals(osName)) { if (!"amd64".equals(osArch)) { failRequirement("Presto requires x86-64 or amd64 on Linux (found %s)", osArch); } } else if ("Mac OS X".equals(osName)) { if (!"x86_64".equals(osArch)) { failRequirement("Presto requires x86_64 on Mac OS X (found %s)", osArch); } } else { failRequirement("Presto requires Linux or Mac OS X (found %s)", osName); } if (!ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) { failRequirement("Presto requires a little endian platform (found %s)", ByteOrder.nativeOrder()); } verifySlice(); }
From source file:io.prestosql.server.PrestoSystemRequirements.java
private static void verifyOsArchitecture() { String osName = StandardSystemProperty.OS_NAME.value(); String osArch = StandardSystemProperty.OS_ARCH.value(); if ("Linux".equals(osName)) { if (!"amd64".equals(osArch) && !"ppc64le".equals(osArch)) { failRequirement("Presto requires amd64 or ppc64le on Linux (found %s)", osArch); }//w w w .j a v a 2 s.c om if ("ppc64le".equals(osArch)) { warnRequirement("Support for the POWER architecture is experimental"); } } else if ("Mac OS X".equals(osName)) { if (!"x86_64".equals(osArch)) { failRequirement("Presto requires x86_64 on Mac OS X (found %s)", osArch); } } else { failRequirement("Presto requires Linux or Mac OS X (found %s)", osName); } }
From source file:org.killbill.billing.server.updatechecker.ClientInfo.java
public String getPlatform() { return getProperty(StandardSystemProperty.OS_ARCH); }
From source file:org.killbill.billing.server.updatechecker.ClientInfo.java
public String getOSArch() { return getProperty(StandardSystemProperty.OS_ARCH); }