diff --git a/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/java/JavaTestCompiler.kt b/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/java/JavaTestCompiler.kt index c4c5250c0..24d875506 100644 --- a/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/java/JavaTestCompiler.kt +++ b/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/java/JavaTestCompiler.kt @@ -42,7 +42,10 @@ class JavaTestCompiler( // compile file val errorMsg = CommandLineRunner.run( arrayListOf( - javac, + /** + * Filepath may contain spaces, so we need to wrap it in quotes. + */ + "'$javac'", "-cp", classPaths, path, diff --git a/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/kotlin/KotlinTestCompiler.kt b/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/kotlin/KotlinTestCompiler.kt index 1d242e106..3e1573c48 100644 --- a/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/kotlin/KotlinTestCompiler.kt +++ b/core/src/main/kotlin/org/jetbrains/research/testspark/core/test/kotlin/KotlinTestCompiler.kt @@ -57,7 +57,10 @@ class KotlinTestCompiler( // TODO: we treat warnings as errors for now val errorMsg = CommandLineRunner.run( arrayListOf( - kotlinc, + /** + * Filepath may contain spaces, so we need to wrap it in quotes. + */ + "'$kotlinc'", "-cp", classPaths, path,