'Netbeans 12.4 lombok not supported in Editor
NetBeans 12.4. The editor does not see lombok annotations and considers them to be errors.
Maven project.
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
I tried different versions of lombok. I did not see any difference.
It was very upsetting after NB 8.2 (
Is there any solution to this problem?
Solution 1:[1]
You have to fix the imports in your class.
Type ctrl+shift+I to include the lombok imports into your java class
Solution 2:[2]
Seems to have found a solution.
I removed the plugin "The nb-javac Java editing support library". Menu Tools->Plugins. Then restart IDE and install this plugin again. Perhaps his version is more recent, I don't know. Restart IDE again. And now lombok works.
Magic. )
Solution 3:[3]
Sometime there're problems with lombok releases and NetBeans which breaks the functionality. This happened quite some time in the past. So if you encounter any problems with lombok. You should
- Try to upgrade lombok to the most recent lombok version.
- Check the bug tracker for known issues. Normally they pop up quite fast.
- Try to downgrade several versions.
Solution 4:[4]
My solution:
- Downloaded the
lombok.jarto an arbitrary folder - Under Tools/Libraries, I created a New Library, and added the downloaded jar file to the Library Classpath
It worked for a while, but suddenly stopped. Then I did the following:
- Removed the jar from the Library Classpath
- Restarted the IDE
- Re-added the jar file to the Library Classpath
- Restarted the IDE again
This prodecure resolved the issue. In my installation I didn't find the nb-javac Java editing support library plugin nor the project-specific Libraries settings, that's why I used the global Library setting.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | shikida |
| Solution 2 | code23rus |
| Solution 3 | asbachb |
| Solution 4 |
