well 73M that would fit on a zip drive :laughing:
# tornadofx
b
well 73M that would fit on a zip drive 😆
a
On Java 9+ you can use jlink plugin from the same author and it will be 2 times smaller.
b
I had issues with kotlin and that
I should try again
a
I managed to do it in the end. There is an example for tornado
b
yeah I couldn't get it to work
also I think it had an issue with producing windows version from linux
I had problems with split-packages, but not significant problems with jlink intself
b
interesting, I should try that again then
oh wait
but does the jlink plugin packs the JRE as well?
a
yep, it selects only needed module and packs jdk with exteranl executable handle
b
looks like that's what runtime does as well
it is calling jlink too
a
I can search for config with my packed application.
runtime packs the wholed jre. jlink selects only those modules you need
b
hmmm
weard because I'm setting which modules I want
and it dramatically reduced the size
Copy code
runtime {
    imageZip.set(file("$buildDir/fractioncontroller-$version.zip"))
    options.set(listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"))
    modules.set(listOf("java.desktop", "jdk.unsupported", "java.scripting", "java.logging", "java.xml"))
    targetPlatform("windows-x64", "jdk/13/win64")
}
a
Oh, probably it does the same, but does not infer module dependancies
b
and I think jpackage doesn't work with kotlin
a
jpackage is deprecated right now. Jlink is a separate tool and it does work with kotlin
b
javapackage is deprecated
oh yeah and jlink didn't work with logback
that's why I couldn't use it
a
jpackage is the name of new tool in jdk 14, which is not yet released
b
error: package javax.servlet does not exist provides javax.servlet.ServletContainerInitializer with ch.qos.logback.classic.servlet.LogbackServletContainerInitializer;
a
You must use 1.3.x for jigsaw compatibility
b
error: package kotlin.reflect.jvm.internal.impl.resolve does not exist provides kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition with kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition,
a
Let me check if my old build works
b
ok I managed to get it working
it turns out it is slightly bigger
by a few megs
a
What javafx modules have you enabled?
The browser part is rather heavy
b
no I don't have that
oh there we go
a
My minimal distribution was about 35 - 40 megs
b
adding: options.set(listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages"))
oh yeah sure it didn't pack all of javafx
so it wont startc
ok I still have some stuff to manage
I liked the just plug it in approach of runtime
don't have to make a module info file
etc
oh and it is packing both linux and windows javafx
a
Yeah. Sadly JPMS is not widely adopted yet
b
error: module kotlin.stdlib.jdk8 reads package org.jetbrains.annotations from both annotations and checker.framework
a
kotlin stdlib has JPMS compatible artefacts, I am not sure, what is the difference though
By the way, you do not need module file for jlink to work, plugin generates it automatically
Though, you are correct, that it is a pain to make it work.
b
if I let it generate it doesn't work at all
but the runtime plugin does it
I don't even see that checker framework thing anywhere
oh that's new in logback
…
I don't get why it is going in the tests…
ok getting there
... 1 more Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private javafx.scene.control.TextField net.nprod.fractioncontroller.javafx.AppController.columnsinput accessible: module net.prod.fractioncontroller does not "opens net.nprod.fractioncontroller.javafx" to module javafx.fxml
a
I will try to check my old build tomorrow. We moved to JS as primary target.
probably going for runtime plugin is a good idea.
b
😄
it wanted a : opens net.nprod.fractioncontroller.javafx to javafx.fxml;
I'm getting there
I think runtime was doing a good job 🙂
"java.util.MissingResourceException: Can't find bundle for base name com.sun.javafx.tk.quantum.QuantumMessagesBundle, locale en_US"
hah
it just never stops
looks like a problem coming from jfx 13