Why org.eclipse.jdt.compiler.batch/lib/javax20api.jar ? #1225
Unanswered
mickaelistria
asked this question in
Q&A
Replies: 1 comment
-
|
JDK compiles against Java 17. "javax20api" suggests that it is API from Java 20, and that is the reason the jar is added in #755 / #759.
Not in my IDE, where I see ~ 1999 compilation errors if removing lib/javax20api.jar from build.properties. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm investigating consuming some internal OpenJDK compiler API into JDT compiler. (org.eclipse.jdt.compiler.batch) This can be relatively easily achieved with a couple of settings in build.properties and pom.xml to
--add-exports jdk.internal/com.sun.tools.javac.jvm.However, I noticed that doing so introduce some issues with Tycho compiler because adding this module also add the
java.compilermodule which is a requirement, and Tycho compiler complains later "The package javax.tools is accessible from more than one module: , java.compiler" and fails at compiling. The "" here is a reference to org.eclipse.jdt.compiler.batch/lib/javax20api.jar which is added to the build path according to the build.properties/jars.extra.classpath directive. I tried removing this jar from the build.properties and classpath, and everything worked. So I'm wondering: why is this jar necessary at all? Why can't the bundle reference the API from the JDK? Couldn't the jar be replaced with some module-info.java to request usage of java.compiler package instead?Beta Was this translation helpful? Give feedback.
All reactions