summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorThomas Becker2012-01-30 08:33:15 (EST)
committer Joakim Erdfelt2012-01-30 11:17:48 (EST)
commit49198a8a5c428bc18424d7a5ff75cc2a21cce261 (patch)
treec2a72b738f4dbb46cbf396dbfe6a5c07c90337c4
parentb2b8cf5dd55300a46fc4732dbe91264f5b04771e (diff)
downloadorg.eclipse.jetty.project-49198a8a5c428bc18424d7a5ff75cc2a21cce261.zip
org.eclipse.jetty.project-49198a8a5c428bc18424d7a5ff75cc2a21cce261.tar.gz
org.eclipse.jetty.project-49198a8a5c428bc18424d7a5ff75cc2a21cce261.tar.bz2
Revert "369349 replace quotes with a space escape method"
This reverts commit bc5ac3622aa39b6e60b96ab24b0fb11c09535172. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
index a221c34..34715f9 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
@@ -664,40 +664,39 @@ public class Main
StringBuilder cmd = new StringBuilder();
cmd.append(findJavaBin());
for (String x : _jvmArgs) {
- cmd.append(x);
+ cmd.append(" \"").append(x).append("\"");
}
- cmd.append(" -Djetty.home=").append(escapeSpaces(_jettyHome));
+ cmd.append(" \"-Djetty.home=").append(_jettyHome).append("\"");
for (String p : _sysProps)
{
- cmd.append(" -D").append(p);
+ cmd.append(" \"-D").append(p);
String v = System.getProperty(p);
if (v != null && v.length() > 0)
- cmd.append("=").append(escapeSpaces(v));
+ cmd.append('=').append(v);
+ cmd.append("\"");
}
- cmd.append(" -cp ").append(classpath.toString());
- cmd.append(" ").append(_config.getMainClassname());
+ cmd.append(" -cp \"").append(classpath.toString()).append("\"");
+ cmd.append(" ").append(_config.getMainClassname());
// Check if we need to pass properties as a file
Properties properties = Config.getProperties();
if (properties.size() > 0)
{
File prop_file = File.createTempFile("start",".properties");
- if (!_dryRun)
+ if (!_dryRun) {
prop_file.deleteOnExit();
+ }
properties.store(new FileOutputStream(prop_file),"start.jar properties");
- cmd.append(" ").append(escapeSpaces(prop_file.getAbsolutePath()));
+ cmd.append(" \"").append(prop_file.getAbsolutePath()).append("\"");
}
for (String xml : xmls)
- cmd.append(" ").append(escapeSpaces(xml));
+ {
+ cmd.append(" \"").append(xml).append("\"");
+ }
return cmd.toString();
}
-
- private static String escapeSpaces(String s)
- {
- return s.replace(" ","\\ ");
- }
private String findJavaBin()
{