From a7fb9877ffc17ea18f335c9524e32ab63455781e Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Tue, 18 Oct 2016 12:47:36 +0300 Subject: [PATCH] temp fix to run compiler under jdk 9 --- .../com/intellij/compiler/server/BuildManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java index f7cb4b280865..8e0de0afddfa 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java @@ -1153,6 +1153,17 @@ public class BuildManager implements Disposable { cmdLine.addParameters(args); } + //TODO[Dmitry Batkovich] should be replaced with the proper solution + if (sdkVersion != null && sdkVersion.isAtLeast(JavaSdkVersion.JDK_1_9)) { + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"); + cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"); + } + @SuppressWarnings("UnnecessaryFullyQualifiedName") final Class launcherClass = org.jetbrains.jps.cmdline.Launcher.class;