Categories: windows, macos, javafx

Packaging javafx jar as application for mac

1 answer

I've made a jar file that requires javafx libraries to run. I know that the command to run it is: java --module-path /PATH_TO_JAVAFX_SDK --add-modules javafx.controls -jar FILE.jar. This is all well and good, but is there a way to package this into a Mac application and/or a Windows exe so that my users won't have to download the FX SDK?

All answers to this question, which has the identifier 60807694

The best answer:

Yes, you must make a fat JAR, i.e. a JAR file which contains all the dependencies your project requires. You can add libraries into your JAR by clicking the following in IntelliJ:

File > Project Structure > Artifacts > click the "+" symbol > Extracted Directory > and then select all the .jar files in the JavaFX folder.

If you're using JavaFX 11 or above, also include the .so files:

File > Project Structure > Artifacts > click the "+" symbol > File > and then select all the .so files in the JavaFX folder.

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type com.google.firebase.iid.zzav is referenced as an interface from com.google.firebase.messaging.zzd”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data