@@ -7,11 +7,11 @@ import org.javacs.ktda.core.launch.AttachConfiguration
7
7
import org.javacs.ktda.core.DebugContext
8
8
import org.javacs.ktda.util.KotlinDAException
9
9
import org.javacs.ktda.jdi.JDIDebuggee
10
+ import com.sun.jdi.Bootstrap
10
11
import com.sun.jdi.VirtualMachineManager
11
12
import com.sun.jdi.connect.Connector
12
13
import com.sun.jdi.connect.LaunchingConnector
13
14
import com.sun.jdi.connect.AttachingConnector
14
- import com.sun.tools.jdi.KDACommandLineLauncher
15
15
import java.io.File
16
16
import java.nio.file.Path
17
17
import java.nio.file.Files
@@ -23,8 +23,7 @@ class JDILauncher(
23
23
private val modulePaths : String? = null
24
24
) : DebugLauncher {
25
25
private val vmManager: VirtualMachineManager
26
- // using our own manager to use KDALaunchingConnector
27
- get() = KDAVirtualMachineManager .manager()
26
+ get() = Bootstrap .virtualMachineManager()
28
27
29
28
override fun launch (config : LaunchConfiguration , context : DebugContext ): JDIDebuggee {
30
29
val connector = createLaunchConnector()
@@ -55,7 +54,7 @@ class JDILauncher(
55
54
args[" options" ]!! .setValue(formatOptions(config))
56
55
args[" main" ]!! .setValue(formatMainClass(config))
57
56
args[" cwd" ]!! .setValue(config.cwd.toAbsolutePath().toString())
58
- args[" envs" ]!! .setValue(KDALaunchingConnector .urlEncode(config.envs) ? : " " )
57
+ args[" envs" ]!! .setValue(KDACommandLineLauncher .urlEncode(config.envs) ? : " " )
59
58
}
60
59
61
60
private fun createAttachArgs (config : AttachConfiguration , connector : Connector ): Map <String , Connector .Argument > = connector.defaultArguments()
@@ -71,7 +70,7 @@ class JDILauncher(
71
70
72
71
private fun createLaunchConnector (): LaunchingConnector = vmManager.launchingConnectors()
73
72
// Using our own connector to support cwd and envs
74
- .let { it.find { it.name().equals(KDALaunchingConnector ::class .java.name) } ? : it.firstOrNull() }
73
+ .let { it.find { it.name().equals(KDACommandLineLauncher ::class .java.name) } ? : it.firstOrNull() }
75
74
? : throw KotlinDAException (" Could not find a launching connector (for a new debuggee VM)" )
76
75
77
76
private fun sourcesRootsOf (projectRoot : Path ): Set <Path > = projectRoot.resolve(" src" )
0 commit comments