From a86a24f480d1d33619ecf81dd2d84ca46e55a819 Mon Sep 17 00:00:00 2001 From: Henning Treu Date: Mon, 25 Nov 2019 16:30:10 +0100 Subject: [PATCH] Fix attach to IBM J9 JVMs --- .../src/main/java/net/bytebuddy/agent/VirtualMachine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;