Possible Duplicate:
How can I convert my java program to an .exe file ?
I wrote a program with Java and MySQL.
I built a .jar file from it and it works when its connector was with it.
Now I want to convert my project to a simple .exe, and used of install anywhere but to build .exe file from my project.
When I click on .exe file, it can't connect to database because its connector wasn't with it.
How can I build an .exe file from my project that doesn't have problems with connecting to开发者_StackOverflow社区 MySQL?
Launch4J
JSmooth
You shouldn't.
- Exe-files are bound to the windows plattform. One big advantage of Java, platform independence, is lost, if you force your customers to use windows.
- Some tools pack the JRE into the package. It gets fat, and the customer ends with 20 JREs for 20 executables, where one original JRE would be enough.
- Either the executables don't update themselves - then the customer is depending on you providing him with updates for the JRE, updates which he might have already get for his independent JRE installation. Or for 20 exes, he get's 20 updates, instead of one.
- You have to rebundle your application with every JRE you support. If you have app version 1.0, 1.1 and 1.2, and JRE has versions 6.01, 6.02 and 6.03, you have 9 distributions, and maybe 9 support cases. For 10x10 updates you may have 100 updates.
- The hot-spot-compiler can be much better, performance wise, than a statically compiled program.
精彩评论