path can be null in jdk9

This commit is contained in:
Alexey Kudravtsev
2017-04-26 13:38:44 +03:00
parent 7aff68612d
commit 6533a1875f
@@ -59,6 +59,7 @@ import com.intellij.openapi.projectRoots.JavaSdk;
import com.intellij.openapi.projectRoots.JavaSdkType;
import com.intellij.openapi.projectRoots.JavaSdkVersion;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.ex.JavaSdkUtil;
import com.intellij.openapi.projectRoots.impl.JavaAwareProjectJdkTableImpl;
import com.intellij.openapi.roots.*;
import com.intellij.openapi.startup.StartupManager;
@@ -1073,7 +1074,7 @@ public class BuildManager implements Disposable {
}
else {
compilerPath = projectJdkType.getToolsPath(projectJdk);
if (compilerPath == null) {
if (compilerPath == null && !JavaSdkUtil.isJdkAtLeast(projectJdk, JavaSdkVersion.JDK_1_9)) {
throw new ExecutionException("Cannot determine path to 'tools.jar' library for " + projectJdk.getName() + " (" + projectJdk.getHomePath() + ")");
}
}