aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-07-18 11:27:05 (EDT)
committerMike Rennie2013-03-19 14:55:12 (EDT)
commite3b5a8b00d58815afb6803675e52cc78d77b07b6 (patch)
treea5a56fe0ef42992087734a28f769078fa86add39
parent569d14ab6535cc76507d276ff364b01427ab0d6b (diff)
downloadeclipse.jdt.debug-e3b5a8b00d58815afb6803675e52cc78d77b07b6.zip
eclipse.jdt.debug-e3b5a8b00d58815afb6803675e52cc78d77b07b6.tar.gz
eclipse.jdt.debug-e3b5a8b00d58815afb6803675e52cc78d77b07b6.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 5874fae..dbac490 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
@@ -378,7 +378,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);
@@ -400,7 +400,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++;
}
}
@@ -409,18 +409,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;
}
}