Skip to content

feat(jdtls): upgrade to vscode-java v1.40.0 with Java 21 for macOS ARM64 fix#128

Open
gruckion wants to merge 3 commits intomicrosoft:mainfrom
gruckion:fix/osx-arm64-runtime-dependencies
Open

feat(jdtls): upgrade to vscode-java v1.40.0 with Java 21 for macOS ARM64 fix#128
gruckion wants to merge 3 commits intomicrosoft:mainfrom
gruckion:fix/osx-arm64-runtime-dependencies

Conversation

@gruckion
Copy link

@gruckion gruckion commented Dec 11, 2025

Summary

This PR fixes macOS ARM64 completions returning 0 items by:

  • Upgrading vscode-java from v1.23.0 to v1.40.0 for all platforms
  • Upgrading bundled JRE from Java 17 to Java 21.0.6
  • Fixing osx-arm64 configuration to use correct darwin-arm64 binary

Problem

On macOS ARM64 (Apple Silicon), Eclipse JDTLS completions returned 0 items while other features (hover, go-to-definition) worked correctly.

Root Causes

  1. Wrong binary downloaded: The osx-arm64 config was downloading the wrong vsix file (darwin-x64 instead of darwin-arm64)
  2. Broken JRE: The bundled JustJ JRE (Java 17) has broken jspawnhelper on macOS ARM64, causing posix_spawn failures when JDTLS tries to spawn processes
  3. JDTLS requirement: Modern JDTLS requires Java 21+ as minimum runtime

Changes

  • runtime_dependencies.json:

    • Updated all platforms from vscode-java v1.23.0 to v1.40.0
    • Changed JRE paths from Java 17 (17.0.8.1-*) to Java 21 (21.0.6-*)
    • Updated lombok from v1.18.30 to v1.18.36
    • Updated JDTLS launcher from 1.6.500.v20230717-2134 to 1.6.1000.v20250131-0606
    • Added proper linux-arm64 support with config_linux_arm configuration
  • eclipse_jdtls.py:

    • Updated JavaSE runtime name from JavaSE-17 to JavaSE-21
  • initialize_params.json:

    • Updated default runtime template from Java 17 to Java 21

Testing

Tested on macOS ARM64 (Apple Silicon M1):

  • Before: Got 0 completions
  • After: Got 2 completions (including newServerNode, class)

Related

gruckion and others added 2 commits December 11, 2025 20:22
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>
@gruckion gruckion changed the title fix(jdtls): use correct ARM64 binary and paths for osx-arm64 feat(jdtls): upgrade to vscode-java v1.40.0 with Java 21 for macOS ARM64 fix Dec 11, 2025
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>
@gruckion
Copy link
Author

@microsoft-github-policy-service agree [company="Gruckion Limited"]

@microsoft-github-policy-service

@gruckion the command you issued was incorrect. Please try again.

Examples are:

@microsoft-github-policy-service agree

and

@microsoft-github-policy-service agree company="your company"

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Copilot uses AI. Check for mistakes.
getattr(child, signal_method)()
except (psutil.NoSuchProcess, psutil.AccessDenied, Exception):
pass
except (psutil.NoSuchProcess, psutil.AccessDenied, Exception):
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'except' clause does nothing but pass and there is no explanatory comment.

Copilot uses AI. Check for mistakes.
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