aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-07-18 11:27:05 (EDT)
committerMike Rennie2012-07-18 11:27:05 (EDT)
commitd175f8d9ea16b28a0f2a79d2e972a887ec333db8 (patch)
tree86568da03322cba71d060bed234f012e95166c2f
parenta24b7af73c4e08e7b05935d30be10b1afd046dcc (diff)
downloadeclipse.jdt.debug-d175f8d9ea16b28a0f2a79d2e972a887ec333db8.zip
eclipse.jdt.debug-d175f8d9ea16b28a0f2a79d2e972a887ec333db8.tar.gz
eclipse.jdt.debug-d175f8d9ea16b28a0f2a79d2e972a887ec333db8.tar.bz2
Bug 327193 - [patch] Launching command line exceeds the windows limit
(replace)
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
index a79b19f..6af03a6 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
@@ -402,7 +402,7 @@ public class StandardVMRunner extends AbstractVMRunner {
//greater than 32767 is a no-go
//see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
if(size > 32767) {
- StringBuffer newcp = new StringBuffer();
+ StringBuffer newcp = new StringBuffer("CLASSPATH="); //$NON-NLS-1$
for (int i = 0; i < cp.length; i++) {
newcp.append(cp[i]);
newcp.append(File.pathSeparatorChar);
@@ -424,7 +424,7 @@ public class StandardVMRunner extends AbstractVMRunner {
if(key.equalsIgnoreCase("CLASSPATH")) { //$NON-NLS-1$
index = idx;
}
- newenvp[idx] = key+'='+value+File.pathSeparatorChar;
+ newenvp[idx] = key+'='+value;
idx++;
}
}
@@ -433,18 +433,12 @@ public class StandardVMRunner extends AbstractVMRunner {
index = getCPIndex(newenvp);
}
if(index < 0) {
- newcp.insert(0, "CLASSPATH="); //$NON-NLS-1$
String[] newenv = new String[newenvp.length+1];
System.arraycopy(newenvp, 0, newenv, 0, newenvp.length);
newenv[newenvp.length] = newcp.toString();
- return newenv;
+ } else {
+ newenvp[index] = newcp.toString();
}
- String oldcp = newenvp[index];
- if(!oldcp.endsWith(File.pathSeparator)) {
- oldcp += File.pathSeparatorChar;
- }
- newcp.insert(0, oldcp);
- newenvp[index] = newcp.toString();
return newenvp;
}
}