This is an automated email from the ASF dual-hosted git repository.
mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 7994e4f987 Fixes "error starting modern compiler" issue on JDK 21.
new c38f663aad Merge pull request #6436 from mbien/add-internal-opt-flag
7994e4f987 is described below
commit 7994e4f987c87549e0f111f8c0b13935d6ba26d3
Author: Michael Bien <[email protected]>
AuthorDate: Tue Sep 12 01:24:37 2023 +0200
Fixes "error starting modern compiler" issue on JDK 21.
When NB is run on JDK 21, building/running NB modules fails with:
Error starting modern compiler
at
org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:64)
...
Caused by: java.lang.IllegalAccessError: class
com.sun.tools.javac.main.Main (in unnamed module @0x50ba363b)
cannot access class jdk.internal.opt.CommandLine$UnmatchedQuote (in module
jdk.internal.opt) because module
jdk.internal.opt does not export jdk.internal.opt to unnamed module
@0x50ba363b
at com.sun.tools.javac.main.Main.compile(Main.java:224)
...
adding jdk.internal.opt to the java module flags list fixes this.
---
nbbuild/jms-config/tools.flags | 1 +
1 file changed, 1 insertion(+)
diff --git a/nbbuild/jms-config/tools.flags b/nbbuild/jms-config/tools.flags
index 60325fd5e4..8abb648b10 100644
--- a/nbbuild/jms-config/tools.flags
+++ b/nbbuild/jms-config/tools.flags
@@ -3,4 +3,5 @@
--add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
--add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED
--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
+--add-exports=jdk.internal.opt/jdk.internal.opt=ALL-UNNAMED
--add-exports=java.management/sun.management=ALL-UNNAMED
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists