Search code examples
javajavafx-2software-distribution

Unable to load JavaFX runtime?


I have made sample application with JavaFX using netbeans 7.2. When I run application from netbeans it is working fine. Now I want to distribute this application as the standalone application.

So I am trying to opening this application from the executable jar file made by netbeans itself in the dist folder. But I am getting error : Unable to Load JavaFX runtime

enter image description here

How to resolve this issue ??

Also I wanted to know the best way to distribute this application as desktop standalone application ? Means I wanted to know the final package for distribution would it be executable jar file ?

For this final package(suggested for above question) will there be any prerequisites for the application to run on windows environment ? : This is importance because our final environment is very limited. It don't have even java installed on it.


Solution

  • I don't know why launching the executable jar created by NetBeans does not work for you.

    You can workaround this issue by packaging your application as a Self Contained Application. Such a package includes the java and javafx runtimes with your application so you never need to worry about distribution and installation of these things to your client. In any case, it sounds like such a package is a good fit for your application.

    A self-contained application is a wrapper for your JavaFX application, making it independent of what the user might have installed.