I am trying to package a proprietary app named luniistore (https://lunii.com/en-us/). It is a companion app of a device for children.
They provide a deb and rpm package for Linux system. Those packages contains a packaged java app that seems to embed a JVM so the deb package contains jars and shared libraries.
I tried to package it and to use autopatchelf to make it work on nix however it ended up with a non functional binary. Patching the libraries of the embedded JVM seems to break it.
I also tried to run the jar directly by install the default jre and launching the jar with java --add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED --add-exports javafx.graphics/com.sun.javafx.util=ALL-UNNAMED -jar ./app/LauncherLoader-2.0.0.jar
It starts but then crashes with a java.lang.NoSuchMethodError exception:
Exception in thread "JavaFX Application Thread" java.lang.NoSuchMethodError: 'sun.util.logging.PlatformLogger com.sun.javafx.util.Logging.getCSSLogger()'
at com.lunii.luniistore.ui.App.start(App.java:104)
at com.lunii.luniistore.launcher.ui.dialogs.LauncherControl.lambda$launchAppFromManifest$13(LauncherControl.java:501)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:290)
at java.base/java.lang.Thread.run(Thread.java:833)
It seems symbols located in the jfxrt.jar package is not found, I suspect a problem in java fx version but I was unable to solve it for the moment.
I tried to install package oraclejdk without success. The nix package requires to download the tar.gz manually and to add it to the store. I used the instruction it gave me but it didn’t work.
I also tried to install the openjdk package by overriding the enableJavaFX option to be sure it is set to true. The jar refuses to start with the same NoSuchMethodError error.
I recently packaged a videogame that’s distributed similarly, with a built-in jvm and a bunch of jar files. I tried for quite a while to get it properly patchelf’d, or to use a nix-native version of the jvm, but ultimately failed at both approaches and just used buildFHSUserEnv. It’s ugly, but it gets the job done.
I worked on a package which came with a bundled JRE. I removed said JRE and used one from Nixpkgs instead. It was challenging to pry apart the JIMAGEs to separate the JRE from the app, but in the end it worked.