Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX - IDE and executable jar performance

I have used both NetBeans and Intellij to generate new HelloWorld JavaFX projects using Java 7_21. It runs successfully in both IDE's and, most importantly, in both cases inside the IDE, the application executes almost instantly. I then create an executable jar from each project. It successfully creates the jar and when I run it (either by double clicking on it or from the command line) it runs correctly but takes about 10 seconds to execute in both cases. At the command prompt I enter "java -version" and it confirms I am running Java 7_21 64bit. Does anyone happen to know why the executable jar runs so slowly while in the IDE's the HelloWorld applications runs so quickly? Thanks

like image 895
yorkville Avatar asked Nov 02 '22 19:11

yorkville


1 Answers

See the JavaFX Deployment troubleshooting guide:

If your application starts slow, then it could be due to network configuration. Try disabling the autoproxy configuration by passing -Djavafx.autoproxy.disable=true to see if it helps.

like image 83
jewelsea Avatar answered Nov 09 '22 11:11

jewelsea