Also, how do I export to a Windows Application? I ...
# tornadofx
d
Also, how do I export to a Windows Application? I heard you could do it with LauncherFX, but I couldn't figure it out.
b
do you want to create a Windows binary?
d
Yes @Bogdan, with a bundeled jre most likely.
d
Thanks I'll look into them.
s
I use badass-runtime-plugin to collect all my dependencies and a jar of my project in one place, then use install4j to create a windows installer for my project. Works like a charm.
d
@Bogdan @Samkeene I tried following the example and reading the documentation, but I'm running into a weird issue which I can't figure out:
Copy code
Execution failed for task ':jre'.
> Directory not found: null/jmods
Here is my build script: https://hastebin.de/fadofohiwi.kotlin
b
@diniamo you have defined the variables JDK_LINUX_HOME, JDK_MAC_HOME, JDK_WIN_HOME. Try using absolute paths
also you do not need to specify this if needed for one system
d
And what do I set them to? Like on windows I'll only have the windows version of jdk obviously.
Oh wait I remember, I can set the to the download links of the JDKs and it'll work automatically. I'll try, thanks once again.
@Bogdan it seems like I managed to build it, but it won't execute, whatever I do. My current build file: https://hastebin.de/sayolosaqi.swift What am I missing here?
I managed to screenshot it. 🤔
b
What specifically doesn't work?
d
The program doesn't start And the thing on the image is to put all the delendencies in the jar. It's stated in the tornadofx setup guide.
b
It's stated in the tornadofx setup guide
this is already done by plugins
The program doesn't start
without error ? No dump file?
d
Not really, the command prompt instantly closes, the screenshot I sent above is me screenshotting it in the right moment.
this is already done by plugins
I recall those not working with Tornadofx for some reason, tho I'm probably wrong.
b
do you run on the command line? If not (to catch a mistake)
d
Hmmm, that's the whole output.
b
it looks like you are launching something wrong. You need a file that has the names of your project
d
I am launching the bat file in the bin folder, with the name of my project.
OK so @Bogdan I did some debugging,it seems like it tries to execute this command:
Copy code
"<pathToProject>\build\image\bin\../bin/java.exe"     -classpath "<pathToProject>\build\image\bin\../lib/*"
which is not ideal, since there is no jar specified. Any more ideas?
If I add the -jar part to the command manually it works. But I obviously want it to be automatic and not do it by hand every time.
Also, it's 70MB, for a very simple program, can I reduce that somehow?
b
OK so @Bogdan I did some debugging,it seems like it tries to execute this command:
https://kotlinlang.slack.com/archives/C136UUPE1/p1616845160012000?thread_ts=1615745999.005900&amp;cid=C136UUPE1 I don't see the
application {}
block:
Copy code
application {
    mainClassName = "fullPackage.MainKt"
}