How can I reduce the OpenJDK 11 bundled JRE in install4j for Linux packages?

Peter Hollemans :

I'm packaging a Java application for Linux using install4j 7.0.8 and I find that when I include in the package the Oracle OpenJDK 11.0.1 for Linux from here:

https://jdk.java.net/11/

that the JRE that's created using the createbundle program is pretty much the same size as the JDK tar.gz file, about 179 Mb. But the pre-packaged JREs from ej-technologies are only 45 Mb. How can I create small JREs for Linux like that?

Ingo Kegel :

You can create a smaller JRE with jlink and then create a JRE bundle from it.

install4j 8 will include functionality to do this directly in the install4j IDE.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=81916&siteId=1