NB 31 uses javac from JDK 27 for the editor features no matter on what JDK you are running NB itself on.
Lombok is failing in that environment right now. https://github.com/projectlombok/lombok/issues/4072 There used to be a more descriptive message for annotation processor failures but lombok is failing differently now - we will try to update this for the next release so that it appears less confusing. -mbien On 8/25/26 13:11, Germano Di Fede wrote: > > Hello everyone, > > I am experiencing an issue with Lombok annotation processing inside > the NetBeans editor. When using annotations like |@Data|, > |@NoArgsConstructor|, or |@AllArgsConstructor|, the IDE throws an > error and fails to recognize the generated methods. > > *My Environment:* > > * > > *IDE:* Apache NetBeans 31 > > * > > *NetBeans Runtime JDK:* JDK 26 > > * > > *Project Target JDK:* JDK 21 > > * > > *Lombok Version:* 1.18.46 (latest) > > *The Error:* The IDE reports the following stack trace in the editor > tooltip/output: |Can't initialize javac processor due to (most likely) > a class loader problem: java.lang.NoClassDefFoundError: Could not > initialize class lombok.javac.Javac||at > lombok.javac.apt.LombokProcessor.placePostCompileAndDontMakeForceRoundDummiesHook(LombokProcessor.java:174)||at > lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:96)||...||at > org.netbeans.modules.java.source.indexing.APTUtils$ErrorToleratingProcessor.init(APTUtils.java:1002)| > > *My thoughts:* I suspect this is a compatibility issue caused by > NetBeans running on JDK 26, which might have changed or locked down > some internal |com.sun.tools.javac| APIs that Lombok 1.18.46 relies on > during the IDE's real-time code analysis. The project itself targets > JDK 21. > > Has anyone else run into this specific issue with JDK 26? Should I > downgrade the JDK that NetBeans runs on to 21 as a workaround? If so, > could you please point me to the correct way to change the runtime JDK > for NetBeans? Or is there a way to configure |nb-javac| to handle this > gracefully? > > Thanks in advance for any help or advice! > > Germano --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
