1

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.

3 Answers 3

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

Doesn't work for me. A command prompt shows, then goes away, but no application window. I guess I'll troubleshoot it. Thanks for the hint.
Nvm. Worked with an added batch file that has this line in it: "java -jar jarFileName.jar". Thanks.
try also to right click your project and select properties, then check build and run options
0

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

Comments

0

You can use Launch4j. Its very simple to use

http://launch4j.sourceforge.net/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.