简体   繁体   中英

Java program is slower as a dist build than when ran from Netbeans

So I have this neat physics sim I made that, while running at certain settings, runs at around 34 fps when ran via the Netbeans "run" -command. Then I click "clean and build" and go open the program from the dist folder, and it runs at around 10 fps with the same setup.

Can it be about Java settings? I don't have any special setting done in Netbeans but I'm not sure how to check my the settings on the installed JRE, can they even be different by default from what Netbeans uses by default?

I doubt it's running a different JDK but you can check the JDK that your Netbeans installation is using at Tools -> Java Platforms. To check what version of Java is in use by the distributed version look at your JAVA_HOME, and Path environment variables.

A major difference between the distributed version and the development environment may be the libraries. Check your CLASSPATH environment variable, and compare the actual files between the distribution and development environment to see that the size and dates match. I'm not totally sure how to get at the CLASSPATH used by Netbeans but can advise that it has some special magic it uses based on the libraries included. Also be aware that the order of the included libraries may make a differen

What software are you using to deploy your project?

Ok problem solved, it was due to outdated Java. I did have my 32 bit Java updated already - the default download at oracle.com but the program was using the 64 bit version, which was actually way outdated. So installing the latest 64 bit release of Java solved it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM