How can i Make an .exe file from jar file [duplicate]

喜你入骨 提交于 2019-12-12 03:56:50

问题


I developed a system using jdk 6. then i want to deploy that system to all kind of users(windows, linux). and also i want to create . exe file to install inside the client machine. this process should check whether there exists java(compatible version) inside the client machine. if there is not java inside the machine then installation process should provides facility to install it.and also software used to do that should be freely available. thanks in advance.


回答1:


Please try using NSIS (http://nsis.sourceforge.net/Main_Page). Basically you will need to write a NSIS script to do the following

  1. Check if JAVA exists. [Depending on 32 or 64 bit machine you need to check different node]
  2. Get the java path
  3. Run the command java -jar XXXX

There are many sample scripts available on NSIS site. Let me know if you need more help. I will send you sample script.




回答2:


there are few tools available for this. google for "JarToExe", "advanceInstaller".

REF: Convert Jar file to EXE executable



来源:https://stackoverflow.com/questions/15377734/how-can-i-make-an-exe-file-from-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!