-
Notifications
You must be signed in to change notification settings - Fork 163
Closed
Description
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 by ASTParser::setEnvironment function. For example:
parser.setEnvironment(cp, null, null, false);By including all JARs (especially, rt.jar) in cp, 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 as rt.jar.
I found two workarounds:
- Packing all JRE modules into a jar file.
- Setting the
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 include rt.jar in the classpath (cp).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels