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

Symbols not getting resolved for lombok on vs code #3909

Open
VincentLee-EN opened this issue Jan 2, 2025 · 8 comments
Open

Symbols not getting resolved for lombok on vs code #3909

VincentLee-EN opened this issue Jan 2, 2025 · 8 comments

Comments

@VincentLee-EN
Copy link

My "Language support for Java ™ for Visual Studio Code" is v1.38.0, Symbols not getting resolved for lombok on vs code,but it can still compile and run

  1. when I use @slf4j,here comes errors:
    Image

  2. when I use @DaTa, the same situation happens
    Image

@snjeza
Copy link
Contributor

snjeza commented Jan 2, 2025

@VincentLee-EN Could you attach a project example reproducing the error?

@VincentLee-EN
Copy link
Author

VincentLee-EN commented Jan 3, 2025 via email

@VincentLee-EN
Copy link
Author

Is it because I'm using Java 17 that the plugin doesn't support it very well yet?

@snjeza
Copy link
Contributor

snjeza commented Jan 3, 2025

How?

You can try Paste, drop or click to add files

Is it because I'm using Java 17 that the plugin doesn't support it very well yet?

You need Java 23 to use javac - "java.jdt.ls.javac.enabled": "on",

@VincentLee-EN
Copy link
Author

How?

You can try Paste, drop or click to add files

Is it because I'm using Java 17 that the plugin doesn't support it very well yet?

You need Java 23 to use javac - "java.jdt.ls.javac.enabled": "on",

My project uses Java17,is it a good idea to upgrade it to Java23?
Or if there is any better solution to user javac while Java version is 17?

@VincentLee-EN
Copy link
Author

How?

You can try Paste, drop or click to add files

Is it because I'm using Java 17 that the plugin doesn't support it very well yet?

You need Java 23 to use javac - "java.jdt.ls.javac.enabled": "on",

My project uses Java17,is it a good idea to upgrade it to Java23? Or if there is any better solution to user javac while Java version is 17?

here is my settings.json for java after I installed java23, but it didn't work, is the config is wrong?
"java.jdt.ls.java.home": "/home/vincent/tools/java/jdk-23.0.1",
"java.jdt.ls.javac.enabled": "on",
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "/home/vincent/tools/java/jdk-17.0.12",
"default": true
},
{
"name": "JavaSE-23",
"path": "/home/vincent/tools/java/jdk-23.0.1",
}
],

@snjeza
Copy link
Contributor

snjeza commented Jan 3, 2025

My project uses Java17

Your project can use Java >= 1.8

@snjeza
Copy link
Contributor

snjeza commented Jan 3, 2025

here is my settings.json for java after I installed java23, but it didn't work, is the config is wrong?

Could you try the following:

  • install VS Code Pre-Release
  • add <your_project>/.settings//org.eclipse.jdt.apt.core.prefs with the following contents
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.genTestSrcDir=.apt_generated_tests
org.eclipse.jdt.apt.reconcileEnabled=true
  • Open the command palette (F1)
  • select Java: Clean the Java Language Server Workspace
  • select Restart and delete from the confirmation prompt

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

2 participants