diff --git a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java index 04c258f3711..30b210ed546 100644 --- a/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java +++ b/byte-buddy-agent/src/main/java/net/bytebuddy/agent/VirtualMachine.java @@ -154,7 +154,7 @@ public Class run() { } catch (ClassNotFoundException exception) { throw new IllegalStateException("Optional JNA dependency is not available", exception); } - return System.getProperty("java.vm.vendor", "").toUpperCase(Locale.US).contains("J9") + return System.getProperty("java.vm.name", "").toUpperCase(Locale.US).contains("J9") ? ForOpenJ9.class : ForHotSpot.class;