use of com.intellij.debugger.ui.GetJPDADialog in project intellij-community by JetBrains.
the class DebuggerManagerImpl method checkTargetJPDAInstalled.
/* Remoting */
private static void checkTargetJPDAInstalled(JavaParameters parameters) throws ExecutionException {
final Sdk jdk = parameters.getJdk();
if (jdk == null) {
throw new ExecutionException(DebuggerBundle.message("error.jdk.not.specified"));
}
final JavaSdkVersion version = JavaSdk.getInstance().getVersion(jdk);
String versionString = jdk.getVersionString();
if (version == JavaSdkVersion.JDK_1_0 || version == JavaSdkVersion.JDK_1_1) {
throw new ExecutionException(DebuggerBundle.message("error.unsupported.jdk.version", versionString));
}
if (SystemInfo.isWindows && version == JavaSdkVersion.JDK_1_2) {
final VirtualFile homeDirectory = jdk.getHomeDirectory();
if (homeDirectory == null || !homeDirectory.isValid()) {
throw new ExecutionException(DebuggerBundle.message("error.invalid.jdk.home", versionString));
}
//noinspection HardCodedStringLiteral
File dllFile = new File(homeDirectory.getPath().replace('/', File.separatorChar) + File.separator + "bin" + File.separator + "jdwp.dll");
if (!dllFile.exists()) {
GetJPDADialog dialog = new GetJPDADialog();
dialog.show();
throw new ExecutionException(DebuggerBundle.message("error.debug.libraries.missing"));
}
}
}
Aggregations