Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Oct 30, 2025

Add shortenWindowsCommandLine() to shorten all command line arguments that exceed Windows MAX_PATH limit, not just the working directory. This fixes issues where Eclipse is unable to launch processes with long executable paths on Windows.

The fix uses Windows GetShortPathName API via Win32Handler to convert long paths to their 8.3 short form before passing them to ProcessBuilder or Runtime.exec().

This was reported in one of my projects, for example when passing a params file (to overcome limitations of too long arguments) it can happen that the path of the parameter file (e.g. java, javadoc and alike tools) itself exceed the path limit.
The same might be if I try to launch c:\java\inaverylongpathaht... exxeedcsthelimit\java.exe

As there was already similar workaround for the working directory it feels good to have similar for the arguments itself but as I'm not a regular windows user it would be great to get some feedback from others, the fix is quite trying to avoid unnecessary checks so in almost all cases would only be a no-op

Copilot AI and others added 2 commits October 30, 2025 11:05
Add shortenWindowsCommandLine() to shorten all command line arguments
that exceed Windows MAX_PATH limit, not just the working directory. This
fixes issues where Eclipse is unable to launch processes with long
executable paths on Windows.

The fix uses Windows GetShortPathName API via Win32Handler to convert
long paths to their 8.3 short form before passing them to ProcessBuilder
or Runtime.exec().

Co-authored-by: laeubi <[email protected]>
@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

debug/org.eclipse.debug.tests/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 9f0ffccea421fab220930395d8f442d89915da4e Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Thu, 30 Oct 2025 10:18:16 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/debug/org.eclipse.debug.tests/META-INF/MANIFEST.MF b/debug/org.eclipse.debug.tests/META-INF/MANIFEST.MF
index 2e9d0678fb..9ec58f9908 100644
--- a/debug/org.eclipse.debug.tests/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.debug.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.debug.tests;singleton:=true
-Bundle-Version: 3.15.100.qualifier
+Bundle-Version: 3.15.200.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
-- 
2.51.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

Test Results

 1 947 files  ±0   1 947 suites  ±0   1h 55m 6s ⏱️ + 15m 33s
 4 722 tests +1   4 697 ✅ ±0   24 💤 ±0  0 ❌ ±0  1 🔥 +1 
14 166 runs  +3  13 996 ✅ ±0  169 💤 +2  0 ❌ ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit a62f59c. ± Comparison against base commit 9001c61.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants