More than 16 000 unresolved references to program class member

I have recently moved from Java 8 to jdk 23 and have used progaurd all the way. But with jdk 23 I get “can’t find referenced method/field” on almost every class. And most of the classes just reference common libraries like java and javax.

I use ant with Neatbeans with following setup:

-injars dist/my.jar
-outjars out.jar
-libraryjars ${java.home}/jmods/java.base.jmod(!**.jar;!module-info.class)
-libraryjars dist/mylibraries
-printmapping myapplication.map
-dontshrink
-dontoptimize

Hi @hmf

In Java 9, the JDK standard library was modularised using the Java modules (jmod) files. So there isn’t a single Java runtime jar like in Java 8 (rt.jar).

You already have the java.base.jmod as a library jar, but if you check the ${java.home}/jmods/ folder you will see there are many jmods.

You are probably using classes from other jmods so you would need to add those as libraryjars as well.

Of course, thank you. After adding eleven other modules it now works fine.