Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JVM vendor check to include Azul Systems #9399

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,30 @@ private PrestoSystemRequirements() {}

public static void verifyJvmRequirements()
{
String runtimeName = System.getProperty("java.runtime.name");
String vendor = StandardSystemProperty.JAVA_VENDOR.value();
if (!"Oracle Corporation".equals(vendor)) {
failRequirement("Presto requires an Oracle or OpenJDK JVM (found %s)", vendor);

// The Oracle(TM) and IBM(TM) JVM runtimes both return:
// Java(TM) SE Runtime Environment
//
// OpenJDK runtimes return:
// OpenJDK Runtime Environment
//
// Querying java.runtime.name allows us to differentiate between an
// OpenJDK JVM and a non-OpenJDK JVM because many OpenJDK's will
// return "Oracle" as their vendor name. However, it doesn't allow us
// to distinguish between different vendors like IBM(TM) and Oracle(TM).
if (!"Java(TM) SE Runtime Environment".equals(runtimeName)) {
warnRequirement("Presto is running on an unsupported JVM runtime " +
"(found %s) - only the Oracle(TM) runtime is supported",
runtimeName);
// Querying java.vendor allows us to differentiate between a Oracle(TM)
// and a non-Oracle(TM) vendor like IBM(TM).
}
else if (!"Oracle Corporation".equals(vendor)) {
warnRequirement("Presto is running on a JVM from an unsupported " +
"vendor (found %s) - the only supported vendor is " +
"Oracle(TM)", vendor);
}

verifyJavaVersion();
Expand Down