Without more info about what toolchain you are using to build your project such 
as which JDK, what toolchain etc we can only help to a point.

If you project is modularised then you need to use jlink to have the JavaFX 
modules included in the runtime. If not, and I suspect this is what you are 
doing, you’ll need to change the way in which you build. One example is a 
shaded JAR that includes the OpenJFX dependencies and then a new main class 
that statically calls the main of the class that extends Application will do 
what this.

> On 18 Dec 2019, at 18:26, Huckleberry Finn <huckle.f...@gmail.com> wrote:
>
> To create a deplyable version of my project  I make a clean & Build project 
> on it. Netbeans will create a jar file in the dist subfolder of the project 
> along with the fx libraries in the lib subfolder of dist.
>
> When I run java -jar myproject.jar, I get
> Error: JavaFX runtime components are missing, and are required to run this 
> application
> How should I include the fx libraries inside the jar file



CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024. Cerner Limited, Registered in 
England no 2519305, Registered Office 37 North Wharf Road, London W2 1AF.

Reply via email to