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

Unable to get it to work like on the README #33

Open
SunnyKentz opened this issue Oct 17, 2024 · 6 comments
Open

Unable to get it to work like on the README #33

SunnyKentz opened this issue Oct 17, 2024 · 6 comments
Assignees

Comments

@SunnyKentz
Copy link

SunnyKentz commented Oct 17, 2024

Hello,
on the README.md it shows you can just do this :

{
  "lsp": {
    "java": {
        "java.jdt.ls.lombokSupport.enabled:": true
    }
  }
}

but i tried to do this by adding my jar libraries to work with javafx :

{
  "lsp": {
      "java": {
      "java.project.sourcePaths": [
              "javafx-sdk/lib",
              "src"
          ],
          "java.project.referencedLibraries": [
              "javafx-sdk/lib/javafx-swt.jar",
              "javafx-sdk/lib/javafx.base.jar",
              "javafx-sdk/lib/javafx.controls.jar",
              "javafx-sdk/lib/javafx.fxml.jar",
              "javafx-sdk/lib/javafx.graphics.jar",
              "javafx-sdk/lib/javafx.media.jar",
              "javafx-sdk/lib/javafx.swing.jar",
              "javafx-sdk/lib/javafx.web.jar"
          ]
       }
    }
}

it would not work.

@ABckh
Copy link
Owner

ABckh commented Oct 19, 2024

Hi @SunnyKentz, do you have those jars in the path you specified in the config?

@SunnyKentz
Copy link
Author

Yes right in my project,
The .Zed and javafx-sdk directory are in the same place. I use a x86 mac.

@Luke-Sims
Copy link

Luke-Sims commented Oct 21, 2024

Hey @SunnyKentz I may have found why it doesn't work,
It seems that the script don't read the settings.json file.
I have found an alternative solution to add a library for the lsp:

  1. create a directory named lib in your project directory
  2. create a symbolic link of the librairies you want to import in this directory. ex on linux and mac: ln -s <source_path> <name>
    So in your case you should have to use ln -s <path to javafx-sdk> javafx-sdk (you don't have to go in the lib directory)

Hope it will help you

@ABckh
Copy link
Owner

ABckh commented Oct 22, 2024

Hi @Luke-Sims thank you very much for the help!
@SunnyKentz thank you for info and apologise for late response, totally missed all notifications from github. I will check whether it can be fixed on the extension's side. Also, let me know if workaround provided by @Luke-Sims helped you

@ABckh ABckh self-assigned this Oct 22, 2024
@SunnyKentz
Copy link
Author

I'll check it out.

@SunnyKentz
Copy link
Author

It worked

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

No branches or pull requests

3 participants