From d13c34200b06a73295f567cbf93c7b456b3f154c Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 20 Jan 2017 18:28:00 +0300 Subject: [PATCH] Remove method deprecated in 171 and explicitly set mainClass before calling toCommandLine() --- .../org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt b/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt index 02224e59c90..2556224ad20 100644 --- a/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt +++ b/idea/idea-repl/src/org/jetbrains/kotlin/console/KotlinConsoleKeeper.kt @@ -57,11 +57,10 @@ class KotlinConsoleKeeper(val project: Project) { private fun createCommandLine(module: Module): GeneralCommandLine? { val javaParameters = createJavaParametersWithSdk(module) - val sdk = javaParameters.jdk ?: return null - val sdkType = sdk.sdkType - val exePath = (sdkType as JavaSdkType).getVMExecutablePath(sdk) - val commandLine = JdkUtil.setupJVMCommandLine(exePath, javaParameters, true) + javaParameters.mainClass = "dummy" + + val commandLine = javaParameters.toCommandLine() val paramList = commandLine.parametersList paramList.clearAll()