diff --git a/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/AgentInitializer.java b/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/AgentInitializer.java index ad683f81232d..15d89cbbd20d 100644 --- a/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/AgentInitializer.java +++ b/javaagent-bootstrap/src/main/java/io/opentelemetry/javaagent/bootstrap/AgentInitializer.java @@ -44,9 +44,9 @@ public static void initialize(Instrumentation inst, File javaagentFile, boolean * @return true for oracle 1.8 before 1.8.0_40 */ private static boolean isEarlyOracle18() { - // Java HotSpot(TM) 64-Bit Server VM + // Java HotSpot(TM) 64-Bit Server VM or OpenJDK 64-Bit Server VM String vmName = System.getProperty("java.vm.name"); - if (!vmName.contains("HotSpot")) { + if (!vmName.contains("HotSpot") && !vmName.contains("OpenJDK")) { return false; } // 1.8.0_31 diff --git a/smoke-tests/src/test/resources/crashearlyjdk8/CrashEarlyJdk8.java b/smoke-tests/src/test/resources/crashearlyjdk8/CrashEarlyJdk8.java index ddd2d8502804..c89e24a573ca 100644 --- a/smoke-tests/src/test/resources/crashearlyjdk8/CrashEarlyJdk8.java +++ b/smoke-tests/src/test/resources/crashearlyjdk8/CrashEarlyJdk8.java @@ -16,7 +16,7 @@ public static void main(String... args) { public void test() { // run loop enough times for jit compiler to kick in - for (int i = 0; i < 10_000; i++) { + for (int i = 0; i < 100_000; i++) { this.bar(this::foo); } }