Skip to content

lombok_jar absolute Windows path is joined to extension workdir, breaking JDTLS startup #300

Closed

Description

@cloud0106

Environment

  • OS: Windows
  • Extension version: 6.8.25

Description

When lsp.jdtls.settings.lombok_jar is set to an absolute Windows path (as documented in the README), JDTLS fails to start.

Steps to reproduce

  1. Set in settings.json:
"lsp": {
  "jdtls": {
    "settings": {
      "lombok_jar": "D:\path\to\lombok-1.18.36.jar"
    }
  }
}
  1. Open any Java file.

Actual behavior

The language server resets the connection. The log shows:

initializing server jdtls, id 1: Server reset the connection
-- stderr --
Error opening zip file or JAR manifest missing : <USERPROFILE>/AppData/Local/Zed/extensions/work/java/D:/path/to/lombok-1.18.36.jar

The configured absolute path is concatenated onto the extension workdir instead of being used as-is.

Expected behavior

The configured absolute path is passed to JDTLS as the -javaagent argument without modification.

Root cause

In src/jdtls_server.rs, command() builds the agent argument with current_dir.join(lombok_jar_path). The extension runs as WASM, which uses POSIX path semantics — a Windows drive-qualified path like D:\... is not treated as absolute there, so join() appends it to the workdir. This does not happen on macOS/Linux because POSIX absolute paths start with /.

Also affected

  • java_debug_jar — src/debugger.rs uses the same current_dir.join(...) pattern in inject_plugin_into_options().

Workaround

Copy the jar into the extension workdir and reference it with a relative path:

extensions/work/java/lombok/lombok-1.18.36.jar
"lombok_jar": "lombok/lombok-1.18.36.jar"

Suggested fix

Only join the configured path with the workdir when it is relative; detect Windows drive-letter paths (e.g. a leading X:\ or X:/ prefix) and use them as-is.

Activity

  1. tartarughina commented on Aug 13, 2026

    @tartarughina
    Collaborator

    Thanks for reporting, this issue has been in the code for some time but it never surfaced. I'll work on a fix for it covering both Lombok and the debugger.

  2. tartarughina commented on Aug 13, 2026

    @tartarughina
    Collaborator

    Fix in #301

  3. tartarughina commented on Aug 14, 2026

    @tartarughina
    Collaborator

    @cloud0106 could you test that on Windows?

  4. cloud0106 commented on Aug 15, 2026

    @cloud0106
    Author

    Thanks for the quick fix! I've reviewed the diff — it matches my suggested approach: user-provided paths are now passed through unchanged, and the regression tests even cover Windows drive paths.

    I can't run a full test on Windows right now, but one heads-up: relative-path configs (my old workaround) are now passed through as a relative -javaagent:lombok/..., which will only resolve if the JVM's cwd happens to be the extension workdir. Absolute paths are fine. Might be worth a note in the README so relative-path users know what to expect.

    Otherwise this looks good to me — thanks again for the fast turnaround!

  5. tartarughina commented on Aug 15, 2026

    @tartarughina
    Collaborator

    Thanks for taking a look.

    About the relative path. That is expected, the user takes ownership of where a component needs to be retrieved.

    Nonetheless, I'll consider whether to make it explicitly clear in the README.

  6. tartarughina commented on Aug 17, 2026

    @tartarughina
    Collaborator

    The fix is included in v6.8.26 and that's now available from the marketplace

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions