Skip to content

jdtls launched failed #317

Closed
Closed

Description

@luca-666

Relevance Confirmation

  • I confirmed that this is not an issue with the Eclipse JDT Language Server itself

What happened?

Extension version: 6.8.29
jdtls version: 1.63.0 (Automatically installed by java extension)

Fails to start in a JDK 21 environment, but runs correctly with JDK 25.
When switching to a manually installed version of jdtls (1.61.0), it runs successfully with both JDK 21 and JDK 25.

What did you expect to happen?

jdtls launched successfully

Environment

Zed: 1.25.2
Platform: macOS 27
Java: OpenJDK 21/OpenJDK 25

Activity

  1. added theissue type on Oct 23, 2026
  2. tartarughina commented on Oct 23, 2026

    @tartarughina
    Collaborator

    @luca-666 could you please share any log available?

  3. quangth14 commented on Oct 23, 2026

    @quangth14

    java-lsp-proxy lets jdtls’s stdin hit EOF before initialize → jdtls exits 13

    Env: macOS 15.8 (arm64), java extension v6.8.29 (proxy bin/v6.8.29/java-lsp-proxy), jdtls 1.63.0, OpenJDK 21.0.11.

    Zed shows cannot read LSP message headers / Server reset the connection on initialize.
    The WARNING: jdk.incubator.vector line is benign, not the cause.

    The proxy log is the real tell:
    JDTLS process spawned (pid=57717)
    HTTP server listening on 127.0.0.1:63814
    JDTLS process exited: Ok(ExitStatus(unix_wait_status(3328)))
    unix_wait_status(3328) = exit code 13 = jdtls’s standard “stdin closed” exit.

    Reproduced outside Zed with the extension’s exact command: sending initialize immediately → handshake succeeds; keeping stdin open but delaying initialize ~4s (mimicking Zed’s normal latency) → identical unix_wait_status(3328); launching jdtls with stdin < /dev/null → exit 13 directly. So the proxy spawns jdtls but doesn’t keep its stdin open while waiting for the first message — jdtls gets EOF and exits before the handshake, and Zed loses this race on every launch.

    Ruled out (verified by hand): Java 21, jdtls 1.63.0, the Gradle project, lombok (lombok_support: false doesn’t help), loopback bind, quarantine/signing, PATH/JAVA_HOME, TMPDIR, permissions.

  4. tartarughina commented on Oct 23, 2026

    @tartarughina
    Collaborator

    @quangth14 thanks for the report.

    The issue lies with the latest update 6.8.29 and JDK 21, JDK25 works as expected.
    While working on a proper fix the option available to address the issue is:

    • manually rolling back to 6.8.28 not the issue
    • Point the option java_home to JDK25

    As @luca-666 identified, providing a different version of jdtls lower than 1.63 1.62 works as well regardless of the JDK version.

  5. tartarughina commented on Oct 23, 2026

    @tartarughina
    Collaborator

    I did some testing removing from the equation Zed and this extension.

    Starting from JDTLS 1.62, Java25 is required.

    eclipse.buildId=unknown
    java.version=21.0.11
    java.vendor=Amazon.com Inc.
    BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_US
    
    !ENTRY org.eclipse.buildship.core 4 0 2026-10-23 11:52:01.293
    !MESSAGE FrameworkEvent ERROR
    !STACK 0
    org.osgi.framework.BundleException: Could not resolve module: org.eclipse.buildship.core [22]
      Unresolved requirement: Require-Bundle: org.eclipse.core.filesystem
        -> Bundle-SymbolicName: org.eclipse.core.filesystem; bundle-version="1.12.0.v20260927-0940"; singleton:="true"
           org.eclipse.core.filesystem [28]
             Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=25))"
    
  6. tartarughina commented on Oct 27, 2026

    @tartarughina
    Collaborator

    Starting from v6.8.30 the extension requires Java25 aligning with what jdtls expects. Closing the issue as now the dependency is well reported both in the error and in the README

  7. luca-666 commented on Oct 28, 2026

    @luca-666
    Author

    9. Starting from v6.8.30 the extension requires Java25 aligning with what jdtls expects. Closing the issue as now the dependency is well reported both in the error and in the README

    Thanks for the reply!
    I have a suggestion regarding the JDK version: Could the extension automatically detect installed JDK 25+? This would save users from having to manually modify the Java path or default version.

  8. tartarughina commented on Oct 28, 2026

    @tartarughina
    Collaborator

    @luca-666 that's a nice suggestion, although the extension runs on a WASM sandbox. It has permissions only for its installation directory.

    Going through the installed JDK versions would require an external script that the extension retrieves during installation. Supporting such a script across multiple platforms would either reintroduce Python, which we worked previously on removing, or require different versions based on shell types, OSes, etc.

    Users can already flip the flag jdk_auto_download to true, and a version of OpenJDK25 is going to be installed for them.

    We could have a TS script, rather than a Python one, and leverage Zed's vended Node runtime actually. But using an external script to overcome limitations purposely set is not the right approach either, @MrSubidubi to confirm this sentiment.

  9. MrSubidubi commented on Oct 28, 2026

    @MrSubidubi
    Contributor

    Yep, can confirm this: While I acknowledge this is not optimal, we generally oppose such workarounds, since we do not want arbitrary scripts to run and probe the users environment. The extension can search in PATH or something similar if it wants (and can also use the Command API to do some probing that can also be blocked), but having external scripts is not something that want nor want to endorse.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    language-serverRelated to the language server.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions