Using fxlauncher for TornadoFx App
yevhenii-nadtochii opened this issue · 6 comments
Hello,
is this supposed to be used with TornadoFx app ? I've tried to generate fxlauncher.jar with Gradle for my app and it's been generated, but doesn't start.
Exception in thread "FXLauncher-Thread" java.lang.NoClassDefFoundError: tornadofx/App at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at fxlauncher.AbstractLauncher.createApplicationEnvironment(AbstractLauncher.java:170) at fxlauncher.Launcher.lambda$start$0(Launcher.java:149) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: tornadofx.App at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 14 more
I checked environment, it's OK. Downloaded fxlauncher.jar from http://fxldemo.tornado.no/ and tried to run. And it works .But mine no. Full build.gradle.kts
java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
Executing gradle generateNativeInstaller
failed as well
java.io.IOException: Exec failed with code 2 command [[fakeroot, dpkg-deb, -b, backuper-unspecified, /home/yevhenii/IdeaProjects/backuper/build/installer/bundles/backuper-unspecified.deb] in /tmp/fxbundler3234726518148691532/images/linux-deb.image
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)
at com.oracle.tools.packager.linux.LinuxDebBundler.buildDeb(LinuxDebBundler.java:871)
at com.oracle.tools.packager.linux.LinuxDebBundler.bundle(LinuxDebBundler.java:363)
at com.oracle.tools.packager.linux.LinuxDebBundler.execute(LinuxDebBundler.java:923)
at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
at com.sun.javafx.tools.packager.Main.main(Main.java:476)
Error: Bundler "DEB Installer" (deb) failed to produce a bundle.
> Task :generateNativeInstaller FAILED
So, what about gradle generateNativeInstaller
, due to its source code it uses version & group, specifying them solves the problem. But it doesn't run anyway.
Same issu here.
So, what about
gradle generateNativeInstaller
, due to its source code it uses version & group, specifying them solves the problem. But it doesn't run anyway.
I've been trying for a week now. No progress 😫
Do I absolutely need applicationUrl
, I just need the installer, but Ii doesn't work ClassNotFoundException
I have exactly the same issue, if anyone was able to solve it please update the thread!
Generally, it needs to be updated. There's no way you can just somehow configure it and that's it. (again, I didn't find how on my own) For me It have been much simpler to write my own simple launcher and some Gradle stuff using fxlauncher as prototype. But I was too lasy to generalize solution and publish it as a separate tool. I thought too little people need it. So,
- you can write your own implementation accordingly only to your needs with two prototypes already provided.
- you can even spend much more time and write it in a generalized form and then publish it as a separate project.