简体   繁体   中英

How to run JavaFX project on every OS

I created default JavaFX project in Netbeans which runs on Linux. I tried to run the generated jar file on Windows but the JavaFX cannot be found. This is the configuration of the jar file.

在此处输入图片说明

How I can configure the jar file to use specific JVM for the OS on which the Jar file is deployed.

Even late, I try to propose an answer:

Obviously on each OS, the JVM location is different.

  1. Since 1.7.0_40 or 41 , if I remember well, or JDK8, JavaFX library is embedded in the JDK so no need to worry about your issue.
  2. If this is a JVM lookup issue, you might want to set JAVA_HOME system property, or set the default running JDK of NetBeans or default projects JVM.
  3. You might also use a build tool such as Maven in order to let dev's on different OS set different JVM location in private properties file.

You shouldn't add manually library as we've done many years ago ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM