Remove method deprecated in 171 and explicitly set mainClass before calling toCommandLine()

This commit is contained in:
Nikolay Krasko
2017-01-20 18:28:00 +03:00
parent fb913bc071
commit d13c34200b
@@ -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()