Hi,
I’m evaluating Aspose.BarCode for java and I’m getting a ClassNotFoundException when running my code using a module path (using a module-info for my project). See stacktrace below. When running using the classpath, everything works fine. This is possibly related to the fact that the class (‘h’), which can not be found at runtime, is located in the package ‘com/aspose/barcode/internal/do’. A package named ‘do’ should not exist as this is a reserved keyword in java (see https://en.wikipedia.org/wiki/List_of_Java_keywords). When running jdeps --generate-module-info on the aspose-barcode.jar the resulting module-info does not exports this faulty package. Hence the resulting error when running this on the module path.
Can the use of a ‘do’ package be avoided when you are (I assume) obfuscating the jar so it can be used in projects using java modules?
Exception in thread “main” java.lang.NoClassDefFoundError: com/aspose/barcode/internal/do/h
at aspose.barcode@22.1-jdk18/com.aspose.barcode.internal.dl.g.a(Unknown Source)
at aspose.barcode@22.1-jdk18/com.aspose.barcode.internal.dl.g.a(Unknown Source)
at aspose.barcode@22.1-jdk18/com.aspose.barcode.generation.BarcodeGenerator.a(Unknown Source)
at aspose.barcode@22.1-jdk18/com.aspose.barcode.generation.BarcodeGenerator.save(Unknown Source)
at aspose.barcode@22.1-jdk18/com.aspose.barcode.generation.BarcodeGenerator.save(Unknown Source)
at aspose.barcode@22.1-jdk18/com.aspose.barcode.generation.BarcodeGenerator.save(Unknown Source)
at test/be.innersight.Test.main(Test.java:15)
Caused by: java.lang.ClassNotFoundException: com.aspose.barcode.internal.do.h
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
… 7 more