How to reduce the size of bundled JRE #716

CLOSED learning portal
Submitted 5 months ago

Hi Lars,

I’m following the '3.6 Including the required JRE into the export' of step 10. Everything works fine, but it seems the bundle JRE function of Eclipse will include all the JRE environments into my application folder, which will add nearly 300MB to the size of my application. Is there any way to provide only the necessary environment for my application? Thank you for your time!

Yours, Yumeng Xiao

Comments

  5 months ago

Hi Xiao, sorry for the missing reply, we had a summer break.

The update site provides multiple JRE versions, one of them is a minimal version. You can add this version to your product if you want.

Please let me know if that works for you, Lars

  5 months ago

Hi Lars, Thanks for the reply. Unfortunately, Separate JRE has been dropped after Java 9. Instead, a tool called jlink is added to Java for generating the least but required JRE. A simple guide for a jar executable is: https://medium.com/azulsystems/using-jlink-to-build-java-runtimes-for-non-modular-applications-9568c5e70ef4, but for the EclipseRCP program, we need to add more targets when using the jdeps command.

Anyhow, I think this is an appealing topic. If an application decides to use RCP as its form, how easy it will deploy can be a decisive factor in the technical selection phase, especially for tool applications. I hope you can consider adding something related to the course.

Yours, Yumeng Xiao

  4 months ago

Never mind. The separate JRE just can’t be found in Oracle E-delivery, but there’re open-source editions later than Java 9 that can be found here: https://adoptopenjdk.net/.

  4 months ago

Hi, the p2 update site also provides minimized Java version to be used. Best regards, Lars

  4 months ago

Hi, the JRE provided by the p2 update site could work for me, too. The size of the zipped output of your sample project is around 50MB. This is a reasonable size. Thank you!

  4 months ago

Great to hear Thank you for the feedback!

Closing the issue as there is nothing left to do here.

  4 months ago

Great to hear Thank you for the feedback!

Closing the issue as there is nothing left to do here.

Please login to write a comment.