How to add JDK ≥ 9 modules as dependencies #1375
ayanamists
started this conversation in
General
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
It's not a bug.
I'm using JDT as a library instead of run a eclipse container, so I can't make use of apis like
IJavaProject. Currently, I could set my jar dependencies byASTParser::setEnvironmentfunction. For example:By including all JARs (especially,
rt.jar) incp, JDT can correctly parse/resolve my java source file. However, since Java 9, the JDK uses modules to distribute the JRE, and there are no longer such JARs asrt.jar.I found two workarounds:
includeRunningVMBootclasspathflag ofsetEnvironmentto true, so that JDT will use the current JVM's JRE.However, I want to know if there's way to add a JRE module as a dependency of
ASTParser? Just like includert.jarin the classpath (cp).Beta Was this translation helpful? Give feedback.
All reactions