Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jdtls] Equinox launcher JAR missing version in filename causes "Cannot find equinox launcher" error #1863

Open
2 tasks done
naxvan opened this issue Jan 25, 2025 · 0 comments

Comments

@naxvan
Copy link

naxvan commented Jan 25, 2025

I've searched open issues for similar requests

  • Yes

I've recently downloaded the latest plugin version of mason.nvim

  • Yes

Problem description

Troubleshooting jdtls Installation in Neovim

Problem

  • jdtls server fails to start after Mason installation
  • Missing version suffix in org.eclipse.equinox.launcher.jar

Verification

ls ~/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher*

Error Details

  • Exception: Cannot find equinox launcher
  • Visible in :LspLog

Reference

Mason.nvim Issue #1849

Solution

Ensure Equinox launcher JAR has complete filename with version suffix.

Expected behavior

jdtls Mason Installation Issue

Problem

  • jdtls server fails to start due to incorrectly named Equinox launcher JAR
  • Missing version suffix prevents detection by jdtls.py

Diagnostic Commands

# Get JAR version from manifest
unzip -p ~/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher.jar META-INF/MANIFEST.MF | grep "Bundle-Version"

# Rename JAR with version (example)
mv ~/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher.jar \
   ~/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar

Proposed Solutions

  1. Mason packaging script should:
    • Download Equinox launcher JAR with correct versioned filename
    • Modify jdtls.py to accept both versioned and unversioned filenames

Environment Details

  • Neovim: v0.9.5
  • Mason.nvim: commit abc123
  • Java: openjdk 17.0.11

Error Log

[ERROR] .../lsp/rpc.lua:770 "Cannot find equinox launcher"

Impact

Blocks Java development workflows for users relying on Mason-installed jdtls.

Affected packages

jdtls.py

Mason output

/home/user/.local/share/nvim/mason/packages/jdtls/bin/jdtls.py

Installation log

[ERROR][2025-01-25 14:49:03] .../vim/lsp/rpc.lua:770	"rpc"	"/home/naxvan/.local/share/nvim/mason/bin/jdtls"	"stderr"	'Traceback (most recent call last):\n  File "/home/naxvan/.local/share/nvim/mason/packages/jdtls/bin/jdtls", line 17, in <module>\n    jdtls.main(sys.argv[1:])\n    ~~~~~~~~~~^^^^^^^^^^^^^^\n  File "/home/naxvan/.local/share/nvim/mason/packages/jdtls/bin/jdtls.py", line 91, in main\n    jar_path = find_equinox_launcher(jdtls_base_path)\n  File "/home/naxvan/.local/share/nvim/mason/packages/jdtls/bin/jdtls.py", line 56, in find_equinox_launcher\n    raise Exception("Cannot find equinox launcher")\nException: Cannot find equinox launcher\n'

Neovim version (>= 0.7)

NVIM v0.10.3
Build type: Release
LuaJIT 2.1.1736781742

Operating system/version

Linux naxvan 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Healthcheck

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/nvim-java/mason-registry version: 2024-12-24-graceful-raft` is installed.
- OK Registry `github.com/mason-org/mason-registry version: 2025-01-25-sheer-datum` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.4 built on linux-gnu.`
- OK curl: `curl 8.11.1 (x86_64-pc-linux-gnu) libcurl/8.11.1 OpenSSL/3.4.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3 OpenLDAP/2.6.9`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- OK node: `v23.6.1`
- OK java: `java version "21.0.6" 2025-01-21 LTS`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.13.1`
- OK cargo: `cargo 1.84.0 (66221abde 2024-11-19)`
- OK npm: `10.9.2`
- OK javac: `javac 21.0.6`
- OK pip: `pip 24.3.1 from /home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.13.1/lib/python3.13/site-packages/pip (python 3.13)`
- OK python venv: `Ok`
- OK Go: `go version go1.23.5 linux/amd64`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Sat 25 Jan 2025 05:15:45 PM -05.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

#1849 (comment)

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

No branches or pull requests

1 participant