How to make a executable file of java fx 2.0 project

前端 未结 3 820
臣服心动
臣服心动 2020-12-24 14:51

I want to make a executable file of my project which I made in Java fx 2.0. Can anyone help me on this?

3条回答
  •  臣服心动
    2020-12-24 14:59

    Javafx 2+ can now easily be packaged as a native exe (with an added payload, which the current JRE), the up to date (as in the end of 2012) article is here: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm

    Out of curiosity I created an executable on Windows (copy-pasting the netbeans build code into netbeans' build.xml) from the canvas and the hello world examples: the app is around 20k, the executable/launcher is around 80k and the added runtime is 138mb.

    By the way if you have an older netbeans install (installed with a pre 1.7jdk) you may have to update it or edit its netbeans.conf fixing the "netbeans_jdkhome" path, otherwise the bundled executable's packaging may fail.

提交回复
热议问题