I developed a JavaFX application, created an Ant script through build.fxbuild
and generated a jar.
The generated jar runs Ok on the computer in my service and on another developer's computer, however it does not run on two non-developer computers, nor does it run on two virtual machines that I have on my pc and incredible as it may seem runs on my home computer, which is a developer. All the OS I tried is Windows (none was 7 Home Basic), I do not believe the problem is OS related.
When I drag the jar, a window pops up:
JavaFX Launcher Error
Exception while running Application
As the image shows:
Runningthejarfromthecommandpromptusingjava-jarmeuprojeto.jar
Igetthefollowingstacktrace:
java.lang.reflect.InvocationTargetExceptionatsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atcom.javafx.main.Main.launchApp(Main.java:642)atcom.javafx.main.Main.main(Main.java:805)Causedby:java.lang.RuntimeException:Applicationlauncherroratcom.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:122)atjava.lang.Thread.run(UnknownSource)Causedby:java.lang.UnsatisfiedLinkError:com.sun.glass.ui.win.WinApplication._invokeLater(Ljava/lang/Runnable;)Vatcom.sun.glass.ui.win.WinApplication._invokeLater(NativeMethod)atcom.sun.glass.ui.Application.invokeLater(Application.java:338)atcom.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:620)atcom.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:173)atcom.sun.javafx.application.PlatformImpl.runAndWait(PlatformImpl.java:212)atcom.sun.javafx.application.PlatformImpl.tkExit(PlatformImpl.java:320)atcom.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:421)atcom.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)atcom.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)...1more
IhaveotherJavaFXapplicationswithfarfewerdependenciesthatrunnormallyonthesecomputers.
IhavealreadycheckedthePATHsystemvariablesandeverythinglooksok.
IusedMaventogetalldependenciescorrectly(Ibelieve),butunfortunatelyIhadtodeploymyprojectthenbecauseIhadtroubledeployingthroughitbecauseitwasaJavaFXproject.ButIkeptthedependencieshebroughtme,andIimportedthemappropriately.
Lookingtounderstandthiserrorthatsaysnothingatall,IfoundaquestionthatcouldhavehelpedmeifIhadadecentanswer:
JavaFX on WindowsXP Error
The mediocre solution proposed by the author itself does not seem appropriate to me, however it made me think that there is some dependence on my jar that was generated.
How do I find out what the problem is if the only tip I have is this mysterious trace stack? And how to solve?
I do not intend to use the JavaFX Maven Plugin , I had some bad experiences with it and I think I will solve my problem by Ant much more easily.