I need deloy application using javafx, but when deloy is by intellij it displays error message:
Java FX Packager: Can't build artifact - fx: deploy is not available in this JDK
I don't know how to deloy application.
I need deloy application using javafx, but when deloy is by intellij it displays error message:
Java FX Packager: Can't build artifact - fx: deploy is not available in this JDK
I don't know how to deloy application.
I stumbled into this issue, too. Here is a link to a youtube that deserves more credit. He has the solution https://www.youtube.com/watch?v=mOv6v_LVCNU So simply put, you need to add a second class that is that main launch for builds.
package main;
public class Start {
public static void main(String[] args){
Main.main(args);
}
}
That is what I did first then on your keyboard click
CTRL + ALT + SHIFT + S
Click artifacts, add at the top, Jar, From modules with dependencies. Under the Main class, select the start file provided. And hit ok.
Last, before building, you need to add the bin folder of your JavaFX. Click the plus button under Output Layout; Click File. There get to your JavaFX JDK Directory. Then bin and add all the files in that folder. Hit ok. and ok again.
Go to build in the top menubar. Click build artifacts. A menu will pop up and click build. Boom, you now have a Jar file that can be run with no commands necessary.
Do not use JavaFX Application under Artifacts when adding. Make sure it's just a jar. It is no longer supported in the latest version of JavaFX
Typically under you project file\out\artifacts\ProjectName