void (VirtualMachine vm) { final String versionString = vm.version(); if ("1.4.0".equals(versionString)) { DebuggerInvocationUtil.swingInvokeLater(myProject, () -> Messages.showMessageDialog( myProject, JavaDebuggerBundle.message("warning.jdk140.unstable"), JavaDebuggerBundle.message("title.jdk140.unstable"), Messages.getWarningIcon() )); } if (getSession().getAlternativeJre() == null) { Sdk runjre = getSession().getRunJre(); JavaVersion version = JavaVersion.tryParse(versionString); if (version != null && (runjre == null || runjre.getSdkType() instanceof JavaSdkType) && !versionMatch(runjre, version)) { Arrays.stream(ProjectJdkTable.getInstance().getAllJdks()) .sorted(Comparator.comparing(sdk -> !(sdk.getSdkType() instanceof JavaSdk))) // prefer regular jdks .filter(sdk -> versionMatch(sdk, version)) .findFirst().ifPresent(sdk -> { XDebuggerManagerImpl.getNotificationGroup().createNotification( JavaDebuggerBundle.message("message.remote.jre.version.mismatch", versionString, runjre != null ? runjre.getVersionString() : "unknown", sdk.getName()) , MessageType.INFO).notify(myProject); getSession().setAlternativeJre(sdk); }); } } }