문제

Is there an easy, one-click way of creating an executable JavaFX file?

I have an JavaFX application functioning when I run it in Netbeans. Is there a way I could get a single file on my desktop that would run the application without the need of Netbeans?

I've read a lot of different tutorials, but I'm not looking for a tutorial. Way too much work for one single file. And a tutorial should not be needed for this. It should be as easy as clicking a button Frustrated.

Plugins for Netbeans are ok. Is there any way of doing this? I don't care what type of file it is, as long as it can run independent of Netbeans, and that it can be run without a command prompt.

도움이 되었습니까?

해결책

I am not sure if this is what you want but you can give it a try.

Select your project and (clean &) build it. Then click the Files tab , select your project and check under the dist folder. There you will find, among others, a .jar file. click the file and your application will run.

I am using NetBeans 8.0 and have loaded one of the samples for JavaFX:DigitalClock

다른 팁

Netbeans and other IDEs have support for the javafxpackager. I'm not useing netbeans but eclipse which makes the feature available as shown in http://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial1 but i'm sure Netbeans provides something similar!

If you target JDK8 only the other answer is correct but i'd still suggest to use javafxpackager to eg create a setup.exe which eg includes a jre so people don't have to have java installed on the system

You can use Launch4j. Its very simple to use

http://launch4j.sourceforge.net/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top