src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java Tue Dec 18 15:08:56 2018 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/AbstractAppImageBuilder.java Tue Dec 18 15:10:45 2018 -0500
@@ -65,6 +65,8 @@
public abstract InputStream getResourceAsStream(String name);
public abstract void prepareApplicationFiles() throws IOException;
public abstract void prepareJreFiles() throws IOException;
+ public abstract Path getAppDir();
+ public abstract Path getAppModsDir();
public Map<String, Object> getProperties() {
return this.properties;
@@ -242,6 +244,11 @@
for (String arg : jvmargs) {
out.println(arg);
}
+ Path modsDir = getAppModsDir();
+ if (modsDir != null && modsDir.toFile().exists()) {
+ out.println("--module-path");
+ out.println(getAppDir().relativize(modsDir));
+ }
Map<String, String> jvmProps = JVM_PROPERTIES.fetchFrom(params);
for (Map.Entry<String, String> property : jvmProps.entrySet()) {
out.println("-D" + property.getKey() + "=" + property.getValue());