feat(jdtls): upgrade to vscode-java v1.40.0 with Java 21 for macOS ARM64 fix#128
feat(jdtls): upgrade to vscode-java v1.40.0 with Java 21 for macOS ARM64 fix#128gruckion wants to merge 3 commits intomicrosoft:mainfrom
Conversation
The osx-arm64 configuration was incorrectly downloading the x64 binary (java@darwin-x64) and using x86_64 JRE paths instead of the proper ARM64 binary and aarch64 paths. Changes: - Download darwin-arm64 VSIX instead of darwin-x64 - Use macosx-aarch64 JRE paths instead of macosx-x86_64 This fixes JDTLS on Apple Silicon Macs (M1/M2/M3).
This commit upgrades Eclipse JDTLS dependencies to fix macOS ARM64 completions and bring modern Java support: Changes: - Update vscode-java from v1.23.0 to v1.40.0 for all platforms - Upgrade bundled JRE from Java 17 to Java 21.0.6 - Update JDTLS launcher to v1.6.1000.v20250131-0606 - Update lombok to v1.18.36 - Fix osx-arm64 to use correct darwin-arm64 binary and aarch64 paths - Add linux-arm64 support with config_linux_arm configuration Why Java 21 is required: - Eclipse JDTLS v1.40+ requires Java 21 as minimum runtime - The bundled JustJ JRE (Java 17) has broken jspawnhelper on macOS ARM64 - Java 21 from vscode-java has proper ARM64 process spawning support This fixes the macOS ARM64 issue where completions returned 0 items due to posix_spawn failures in the bundled Java 17 JRE. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The `parent.children(recursive=True)` call can throw `psutil.NoSuchProcess` if child processes exit during iteration. This was causing TypeScript LSP tests to fail on macOS with "process PID not found" errors during server shutdown. Wrap the children iteration loop in a try-except to handle the race condition where child processes may exit between the time they're enumerated and when we try to signal them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@microsoft-github-policy-service agree [company="Gruckion Limited"] |
|
@gruckion the command you issued was incorrect. Please try again. Examples are: and |
There was a problem hiding this comment.
Pull request overview
This PR upgrades Eclipse JDTLS from vscode-java v1.23.0 (Java 17) to v1.40.0 (Java 21) to fix macOS ARM64 completion issues caused by downloading the wrong binary and using an incompatible JRE version.
Changes:
- Upgraded vscode-java from v1.23.0 to v1.40.0 with Java 21.0.6 for all platforms
- Fixed osx-arm64 configuration to download correct darwin-arm64 binary instead of darwin-x64
- Added linux-arm64 support with proper config_linux_arm configuration
- Updated lombok (1.18.30→1.18.36) and JDTLS launcher versions
Reviewed changes
Copilot reviewed 13 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
eclipse_jdtls/runtime_dependencies.json |
Updated all platform URLs to v1.40.0, Java 21 paths, and fixed osx-arm64 binary |
eclipse_jdtls/initialize_params.json |
Updated default runtime from JavaSE-17 to JavaSE-21 |
eclipse_jdtls/eclipse_jdtls.py |
Updated runtime name assertions from JavaSE-17 to JavaSE-21 |
server.py |
Added exception handling for race condition in process cleanup (unrelated bug fix) |
| Multiple JSON files | Formatting improvements (whitespace normalization) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for child in parent.children(recursive=True): | ||
| try: | ||
| getattr(child, signal_method)() | ||
| except (psutil.NoSuchProcess, psutil.AccessDenied, Exception): |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
| getattr(child, signal_method)() | ||
| except (psutil.NoSuchProcess, psutil.AccessDenied, Exception): | ||
| pass | ||
| except (psutil.NoSuchProcess, psutil.AccessDenied, Exception): |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
Summary
This PR fixes macOS ARM64 completions returning 0 items by:
Problem
On macOS ARM64 (Apple Silicon), Eclipse JDTLS completions returned 0 items while other features (hover, go-to-definition) worked correctly.
Root Causes
jspawnhelperon macOS ARM64, causingposix_spawnfailures when JDTLS tries to spawn processesChanges
runtime_dependencies.json:17.0.8.1-*) to Java 21 (21.0.6-*)1.6.500.v20230717-2134to1.6.1000.v20250131-0606config_linux_armconfigurationeclipse_jdtls.py:JavaSE-17toJavaSE-21initialize_params.json:Testing
Tested on macOS ARM64 (Apple Silicon M1):
Got 0 completionsGot 2 completions(includingnewServerNode,class)Related