Community
Participate
Working Groups
The created classpath is not wrapped in " chars when too long for adding it via commandline (when it gets externalized into a file). This leads to errors when the classpath locations contain spaces. Our analysis shows that the error is originated in: *org.eclipse.jdt.internal.launching.ClasspathShortener* private File createClassPathArgumentFile(String classpath) throws CoreException { try { String timeStamp = getLaunchTimeStamp(); File classPathFile = new File(processTempFilesDir, String.format(LAUNCH_TEMP_FILE_PREFIX + "%s-classpath-arg-%s.txt", getLaunchConfigurationName(), timeStamp)); //$NON-NLS-1$ byte[] bytes = ("-classpath " + classpath).getBytes(StandardCharsets.UTF_8); //$NON-NLS-1$ Files.write(classPathFile.toPath(), bytes); return classPathFile; } catch (IOException e) { throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IStatus.ERROR, "Cannot create classpath argument file", e)); //$NON-NLS-1$ } } Also we found Bug #385738 which introduced the problem. In former versions of Eclipse IDE classpath location with spaces worked fine. Can you please fix this regression? Best regards, Stefan
Also the Backslashs in the classpath (used in Windowsmachine as name-separator) musst inside the Argument File duplicated: classpath.replace("\\","\\\\") https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-4856361B-8BFD-4964-AE84-121F5F6CF111 -> Because backslash (\) is an escape character, a backslash character must be escaped with another backslash character. For Test: on Windows: eclipse use the Argument File, if the normal commandline is longer than ClasspathShortener.getMaxCommandLineLength(): 32767 (ARG_MAX_WINDOWS) - 2048
@Cédric, Can you look into this?
Is this still reproducible after the fix for bug 552037 / using 4.14 RC2?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.