< prev index next >
modules/fxpackager/src/main/java/com/oracle/tools/packager/JDepHelper.java
Print this page
@@ -66,15 +66,16 @@
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(baos)) {
List<String> arguments = new ArrayList<>();
arguments.add("-s");
- //TODO JDK-8148654 - add support for -modulepath.
- //if (modulePath != null || !modulePath.empty()) {
- // arguments.add("-modulepath");
- // ...
- //}
+
+ if (modulePath != null || !modulePath.isEmpty()) {
+ arguments.add("-modulepath");
+ arguments.add(ListOfPathToString(modulePath));
+ }
+
arguments.addAll(Files);
invokeJdep(arguments.toArray(new String[arguments.size()]), writer);
// output format is multiple lines of "this.jar -> that.module.name"
@@ -86,6 +87,21 @@
} catch (IOException ioe) {
Log.verbose(ioe);
return new LinkedHashSet();
}
}
+
+ private static String ListOfPathToString(List<Path> Value) {
+ String result = "";
+
+ for (Path path : Value) {
+ if (result.isEmpty()) {
+ result = path.toString();
+ }
+ else {
+ result = File.pathSeparator + path.toString();
+ }
+ }
+
+ return result;
+ }
}
< prev index next >