diff --git a/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java b/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java index a1e881fe3575..4d2700555a3a 100644 --- a/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java +++ b/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java @@ -61,9 +61,9 @@ private static Resource doBuildResource() { if (javaHome != null) { StringBuilder executablePath = new StringBuilder(javaHome); executablePath - .append(File.pathSeparatorChar) + .append(File.separatorChar) .append("bin") - .append(File.pathSeparatorChar) + .append(File.separatorChar) .append("java"); if (osName != null && osName.toLowerCase().startsWith("windows")) { executablePath.append(".exe");