8157895: langtools launcher.sh-template script is broken
Summary: Add logic to quote Xpatch paths
Reviewed-by: jjg
--- a/langtools/make/build.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/build.xml Thu May 26 18:09:42 2016 +0100
@@ -89,11 +89,17 @@
</pathconvert>
<pathconvert property="xpatch.rest" pathsep=" -Xpatch:">
+ <regexpmapper from="${file.separator}([^${file.separator}]+)$" to='\1="${build.modules}${file.separator}\1"' />
+ <dirset dir="${src.dir}" includes="*.*"/>
+ </pathconvert>
+
+ <pathconvert property="xpatch.noquotes.rest" pathsep=" -Xpatch:">
<regexpmapper from="${file.separator}([^${file.separator}]+)$" to="\1=${build.modules}${file.separator}\1" />
<dirset dir="${src.dir}" includes="*.*"/>
</pathconvert>
<property name="xpatch.cmd" value="-Xpatch:${xpatch.rest}"/>
+ <property name="xpatch.noquotes.cmd" value="-Xpatch:${xpatch.noquotes.rest}"/>
<!-- java.marker is set to a marker file to check for within a Java install dir.
The best file to check for across Solaris/Linux/Windows/MacOS is one of the
@@ -341,7 +347,7 @@
jdk="@{jdk}"
agentvm="@{agentvm}" verbose="@{verbose}"
failonerror="false" resultproperty="jtreg.@{name}.result"
- vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.cmd}">
+ vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}">
<arg value="-debug:@{jpda.jvmargs}"/>
<arg line="@{keywords}"/>
<arg line="@{options}"/>
--- a/langtools/make/intellij/runConfigurations/javac.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javac.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="javac" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
- <option name="VM_PARAMETERS" value="@XPATCH@" />
+ <option name="VM_PARAMETERS" value='@XPATCH@' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/javadoc.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javadoc.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="javadoc" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
- <option name="VM_PARAMETERS" value="@XPATCH@" />
+ <option name="VM_PARAMETERS" value='@XPATCH@' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/javah.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javah.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="javah" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
- <option name="VM_PARAMETERS" value="@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.javah=ALL-UNNAMED" />
+ <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.javah=ALL-UNNAMED' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/javap.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/javap.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="javap" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
- <option name="VM_PARAMETERS" value="@XPATCH@ -XaddExports:jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" />
+ <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/jshell.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/jshell.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="jshell" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="jdk.internal.jshell.tool.JShellTool" />
- <option name="VM_PARAMETERS" value="@XPATCH@ -XaddExports:jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED" />
+ <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/intellij/runConfigurations/sjavac.xml Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/intellij/runConfigurations/sjavac.xml Thu May 26 18:09:42 2016 +0100
@@ -2,7 +2,7 @@
<configuration default="false" name="sjavac" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
- <option name="VM_PARAMETERS" value="@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.sjavac=ALL-UNNAMED" />
+ <option name="VM_PARAMETERS" value='@XPATCH@ -XaddExports:jdk.compiler/com.sun.tools.sjavac=ALL-UNNAMED' />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
--- a/langtools/make/launcher.sh-template Thu May 26 07:58:01 2016 -0700
+++ b/langtools/make/launcher.sh-template Thu May 26 18:09:42 2016 +0100
@@ -48,4 +48,4 @@
unset DUALCASE
IFS=$nl
-"#TARGET_JAVA#" "#XPATCH#" ${ea} ${javaOpts} #PROGRAM# ${toolOpts}
+"#TARGET_JAVA#" #XPATCH# ${ea} ${javaOpts} #PROGRAM# ${toolOpts}