[102158]
diff --git a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
index 4384e43..187cb30 100644
--- a/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.jst.server.generic.core/src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java
@@ -16,8 +16,11 @@
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+import java.util.StringTokenizer;
import org.apache.tools.ant.taskdefs.Execute;
import org.eclipse.core.runtime.CoreException;
@@ -99,9 +102,15 @@
// get the executable commandline
String commandline = configuration.getAttribute(COMMANDLINE, (String) null);
- if (commandline == null) {
+ if (commandline == null || commandline.length() == 0) {
abort(GenericServerCoreMessages.commandlineUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
}
+ // specified commandline might be multiple args, need to parse
+ List cmds = new ArrayList();
+ StringTokenizer st = new StringTokenizer(commandline);
+ while (st.hasMoreTokens()) {
+ cmds.add(st.nextToken());
+ }
// get a descriptive name for the executable
String executableName = configuration.getAttribute(EXECUTABLE_NAME, DEFAULT_EXECUTABLE_NAME);
@@ -118,7 +127,7 @@
// Launch the executable for the configuration using the Ant Execute class
try {
- Process process = Execute.launch(null, new String[]{commandline}, env, workingDir, true);
+ Process process = Execute.launch(null, (String[])cmds.toArray(new String[cmds.size()]), env, workingDir, true);
IProcess runtimeProcess = new RuntimeProcess(launch, process, executableName, null);
launch.addProcess(runtimeProcess);
serverBehavior.setProcess(runtimeProcess);