Ubuntu/Debian:
sudo apt update
sudo apt install openjdk-17-jdk -y
Check:
java -version
Should show something like:
openjdk version "17"
Then rebuild project first:
cd /home/demo/Weasis_466
./mvnw clean install
OR if using Gradle:
./gradlew build
After successful build:
cd weasis-native
./build/script/package-weasis.sh --jdk "/usr/lib/jvm/java-17-openjdk-amd64"
Also verify the class exists:
find . -name "*.jar" | xargs jar tf | grep NativeLibrary
If nothing appears, the project did not compile correctly.
--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dcm4che/0a039c66-43c0-4d80-b4d8-3c3377b582b5n%40googlegroups.com.
Looking at your error, the issue is clear: org.weasis.core.util.NativeLibrary can't be found, which means the Weasis JARs haven't been built yet before running the packaging script.
Here's what's happening and what you need to do:
The package-weasis.sh script expects compiled Weasis JARs (including weasis-core-util) to already exist in your local Maven repository or a specific directory. The class org.weasis.core.util.NativeLibrary lives in the weasis-core-util module and must be compiled first.
Step 1 — Build Weasis itself with Maven first:
# Clone and build the main Weasis project
git clone https://github.com/nroduit/Weasis.git
cd Weasis
mvn clean install -PstandardStep 2 — Then run the native packager from the weasis-native repo:
cd /home/demo/weasis-native
./build/script/package-weasis.sh --jdk "/usr/lib/jvm/java-17-openjdk-amd64"1. Additional build step required?
Yes — you must run mvn clean install on the main Weasis repository before running package-weasis.sh. The native packaging repo (weasis-native) is a separate repo that consumes the build artifacts.
2. Is NativeLibrary generated by Maven?
Yes, it's compiled from source in the weasis-core-util module of the main Weasis repo. It is not auto-generated — it's a regular Java class that must be compiled and installed into your local ~/.m2 repository first.
3. Supported JDK version? Weasis native packaging officially supports JDK 17 (which you're already using — good). JDK 21 may work but isn't always tested. JDK 25 is too new and unsupported. Stick with 17.
# Verify the JAR exists after Maven build
ls ~/.m2/repository/org/weasis/core/weasis-core-util/
# Should show something like:
# 4.x.x/weasis-core-util-4.x.x.jarIf that directory is empty or missing, the Maven build didn't complete successfully and needs to be fixed first before the packaging script will ever work — regardless of which JDK version you use.
To view this discussion visit https://groups.google.com/d/msgid/dcm4che/e98d4ff4-e902-4e29-98c9-ceb1fb03cdadn%40googlegroups.com.