diff --git a/test/jdk/java/lang/ProcessBuilder/Basic.java b/test/jdk/java/lang/ProcessBuilder/Basic.java index 6d51cb78f98..3cd5aefdea4 100644 --- a/test/jdk/java/lang/ProcessBuilder/Basic.java +++ b/test/jdk/java/lang/ProcessBuilder/Basic.java @@ -23,7 +23,7 @@ /* * =========================================================================== - * (c) Copyright IBM Corp. 2020, 2021 All Rights Reserved + * (c) Copyright IBM Corp. 2020, 2022 All Rights Reserved * =========================================================================== */ @@ -298,7 +298,8 @@ private static String getenvAsString(Map environment) { environment = new TreeMap<>(environment); for (Map.Entry e : environment.entrySet()) // Ignore magic environment variables added by the launcher - if (! e.getKey().equals("LD_LIBRARY_PATH")) + if (! e.getKey().equals("LD_LIBRARY_PATH") && + ! e.getKey().equals("OPENJ9_JAVA_COMMAND_LINE")) sb.append(e.getKey()) .append('=') .append(e.getValue())