Added quotes to classpath values to handle spaces.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1679 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
loginov 2007-08-27 21:40:46 +00:00
parent 2225703e9a
commit 2c850563f0
1 changed files with 5 additions and 9 deletions

View File

@ -35,7 +35,7 @@ public class JavaLauncher extends Launcher {
/**
* Paths that will be added to the current process's classpath
*/
private final List<String> xtraClasspath = new ArrayList<String>();;
private final List<String> xtraClasspath = new ArrayList<String>();
private Thread stdOutDrain;
@ -129,19 +129,15 @@ public class JavaLauncher extends Launcher {
}
private String makeClasspath() {
String cp = " -classpath " + System.getProperty("java.class.path");
String cp = System.getProperty("java.class.path");
if (getXtraClassPath() == null || getXtraClassPath().isEmpty()) {
return cp;
return " -classpath \"" + cp + " \"";
} else {
cp += ";";
for (Iterator it = getXtraClassPath().iterator(); it.hasNext();) {
cp += ";";
cp += (String) it.next();
if (it.hasNext()) {
cp += ";";
}
}
cp += " ";
return cp;
return " -classpath \"" + cp + " \"";
}
}
}