From f6ca592c920badf0c580943e5b8e6763d46d7a39 Mon Sep 17 00:00:00 2001 From: Thushara-Piyasekara Date: Sun, 31 Mar 2024 22:35:50 +0530 Subject: [PATCH] Fix java -cp args not handling properly in windows --- .../src/main/java/org/ballerinalang/test/BRunUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/BRunUtil.java b/tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/BRunUtil.java index dfc7680ac7e7..6ac8a1744bc9 100644 --- a/tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/BRunUtil.java +++ b/tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/BRunUtil.java @@ -323,6 +323,7 @@ public static ExitDetails run(CompileResult compileResult, List javaOpts String classPathString = System.getProperty("java.class.path") + classPath; // Create an argument file for Windows to mitigate the long classpath issue. if (IS_WINDOWS) { + classPathString = classPathString.replace(" ", "%20"); String classPathArgs = "classPathArgs"; try { File classPathArgsFile = File.createTempFile(classPathArgs, ".txt");