some of our customers complain about an error "JavaFX Launcher Error: unable to load jar". Appearently it only occurs at very few of our customers.
First, does anybody have a hint, what it could be?
Second, how can I properly log such an error with stracktrace?
I once tried to log errors, which occur during startup, but wasn't able to, because the JavaFX Packager brings his own main method.
Therefore we initialize our logger in the Application's start method, which is to late for startup errors.
If I execute the program from console ("java -jar *.jar") I get a stacktrace, e.g.
Exception in Application constructor java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.javafx.main.Main.launchApp(Main.java:642) at com.javafx.main.Main.main(Main.java:805) Caused by: java.lang.RuntimeException: Unable to construct Application instance: class ******* at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:393) at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47) at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NoClassDefFoundError: ...
(e.g. when my manifest contains wrong classpath entries)
Are there any ways to find the real cause of the above error? Did JavaFX write some log file anywhere?
Anyone please got an idea?
Here's our problem:
We have deployed our JavaFX app bundled with a JRE using launch4j to generate an .exe file which uses the local JRE.
When the customer starts the exe, he gets the error "JavaFX Launcher Error: unable to load jar".
Unfortunately I have no idea how to get the real cause (stacktrace). Even if I start the exe from cmd I don't get any information.
Similar with the jar file: If I double click a jar file, whose manifest is broken, I only get the error in a popup window. But the stacktrace is only visible if I start it with "java -jar". (and java -jar doesn't use the local JRE).
The problem is, that I have to find the error, which came with the exe file (which uses the local JRE).
So can I see anywhere a stacktrace in a log file?