In the last 3 days, I've been trying to build the artifacts of a JavaFX application, without success. Below a few specs of the system I am working with:
- IntelliJ 2021.3.1 Build #IC-213.6461.79 (CE)
- Fedora 35
- JDK 17
After some research, it is my understanding that at present, building JavaFX artifacts is problematic at best. I have looked for and tried a number of solutions but none worked and most are probably outdated. Below two issues I stumbled upon when trying to build the artifacts:
1) Going through File -> Project Structure -> Artifacts -> JavaFX Applications simply does not work. This due to the "Can't build artifact - fx:deploy is not available in this JDK" problem.
This is the closest thing I saw to a solution regarding point 1. Unfortunately it does not work for me, and this leads to issue no.2.
The response to that post basically suggests to go through File -> Project Structure -> Artifacts -> "+" -> JAR -> from module with dependancies checking copy to the output directory and link via Manifest.
I follow it but once I get the artifacts, when running java -jar jarfile all I get is a
Error: Invalid or corrupt jarfile
Please note that I followed everything that is recommended in that post. I am clueless on what to do exactly here, any help on this would be really appreciated.