Owing to certain external factors out of my control, I need to change the JRE that is bundled with our app (purely for running the Aspose converters) from Oracle’s Java 7 to OpenJDK 10 or 11. With Java 7, I could follow Oracle’s advice on “Optional files and directory” to reduce the size of the JRE bundled with our app. With the most recent versions of the JDK, this is not possible. Instead, it seems that you need to use jlink to reduce the number of modules included and thus reduce the file size.
I would like only to include the Java files necessary for running Aspose.Words. A process of trial and error seems to show that the only modules Aspose.Words requires are java.base and java.desktop. Conversions to Word format still seem to work fine when I only include these, whereas if I omit java.desktop Aspose.Words will not run.
Could you please confirm that these are indeed the only modules I need to include? Is this documented somewhere?
We have logged your requirement in our issue tracking system. Your ticket number is WORDSNET-17602 . We will further look into the details of this requirement and will keep you updated on the status of the linked issue.
Great, many thanks. I assume that means that you don’t know off-hand which modules are required, then? I’ve ran a few extra tests now including only java.base and java.desktop and everything seems to be running fine, so fingers crossed that’s enough.
It is great that you were able to resolve this issue on your end. We have also logged your comment in our issue tracking system. We will keep you posted on any further updates.
If there’s any further advice you could give on this, I would greatly appreciate it. We released a build of our app with Java set up (via jlink) only to include java.base and java.desktop, but we received bug reports from users that non-English characters were not being exported correctly to Word. Testing this, I could reproduce it - Chinese or Korean characters end up as boxes when exported to Word.
Looking through the available Java modules (using java --list-modules), I decided to try adding jdk.charsets - this solved the issue.
Looking into this some more, I used jdeps on the Aspose .jar file. The jdeps tool lists the following module dependencies for Aspose: