https://kotlinlang.org logo
Title
m

Michael Paus

04/13/2023, 3:29 PM
I’d like to share a lesson learned with you which you may find interesting especially if you are interested in the memory size of compose desktop installer files. I realized that the app bundle which I created locally on my Mac via
packageReleaseDmg
was several megabytes larger than the one which I just created via a GitHub action on a GitHub hosted runner. I used the same repository and configuration on both sides. Even the Java build version (17.0.6) was identical but there still was this size difference. After a long search it turned out that I actually did not use the Java version which I had installed but instead used the one with the same version number that JetBrains IntelliJ had installed in my local Library folder. The mac tool call
/usr/libexec/java_home -version 17
, which was used to set JAVA_HOME, reported this version instead of the one I had installed. So far so good. Technically they both work but there is still this size difference. It finally turned out that JetBrains has added a more than 8MB large fonts folder in
jbr-17.0.6/Contents/Home/lib/fonts
which does not exist in regular Java distributions and this folder gets packaged into every installer that you create with this Java version making it much larger than necessary. So, watch out when you are creating installers and especially if you are putting a lot of effort into creating as small as possible installers.
j

jim

04/13/2023, 3:31 PM
👍 Good to know, thanks for sharing!
s

spierce7

04/13/2023, 3:51 PM
Useful to know! I've been using Coretto everywhere., and managing my local installs with sdkman. JB isn't modifying the Coretto JRE that IntelliJ downloads is it?
m

Michael Paus

04/13/2023, 4:29 PM
I doubt it because the one from JB has its own name
jbr-17.0.6
.
a

Albert Chang

04/13/2023, 4:54 PM
Jenv is your friend.
p

Pablichjenkov

04/13/2023, 6:07 PM
You hack the hell out of it. Thanks