changeset 10135:6b55a303625d

8162923: Error: Unknown Argument thrown by javpackager when argument values are passed with multiple words with in quotation Reviewed-by: cbensen
author vdrozdov
date Tue, 15 Nov 2016 11:43:08 -0800
parents eca3af19aa6f
children 81a54a42693f
files modules/jdk.packager/src/main/native/javapackager/shell/javapackager
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/jdk.packager/src/main/native/javapackager/shell/javapackager	Tue Nov 15 10:11:02 2016 -0800
+++ b/modules/jdk.packager/src/main/native/javapackager/shell/javapackager	Tue Nov 15 11:43:08 2016 -0800
@@ -22,7 +22,7 @@
         ARGUMENT=${i:2}
         JAVA_ARGS="${JAVA_ARGS} ${ARGUMENT}"
     else
-        ARGS+=("$i")
+        ARGS+=("\"$i\"")
     fi
 done
 
@@ -112,4 +112,4 @@
 # separated list to be passed as an argument to JAVA. This is similar to "$@"
 # except we had to strip out some arguments that we don't want to be passed
 # to the Java Packager.
-exec "$JAVA_CMD" ${DEBUG} ${MEMORY} ${JAVA_ARGS} "-Djavafx.home=$javafx_home" -classpath "$classpath" -m jdk.packager/com.sun.javafx.tools.packager.Main $(IFS=$' '; echo "${ARGS[*]}")
+eval exec "$JAVA_CMD" ${DEBUG} ${MEMORY} ${JAVA_ARGS} "-Djavafx.home=$javafx_home" -classpath "$classpath" -m jdk.packager/com.sun.javafx.tools.packager.Main $(IFS=$' '; echo "${ARGS[*]}")