How to generate executable of java project in eclipse [duplicate]

喜夏-厌秋 提交于 2019-12-05 05:06:59

I recommend launch4j to create executables from JAR files.

ankit

You can use JSMOOTH to wrap your jar file into .exe file. from wiki ->JSmooth is a tool for wrapping Java JAR files into Windows Portable Executable EXE files.

For more info you can see this answer

First export your project as a *.jar in eclipse.

Then, you can use JSmooth to make an *.exe file.

Links:

http://www.vogella.com/articles/Eclipse/article.html

http://jsmooth.sourceforge.net/docs/jsmooth-doc.html

The most common way to generate an EXE from a jar file is to use whats known as a "wrapper".

one of the more popular wrappers is http://www.jwrapper.com/ which i belive mojang uses to wrap minecraft for windows.

However if you want to generate a purely native EXE that runs as a standalone you will need a native compiler for example: http://jnc.mtsystems.ch.

At the end of the day java is designed to run on a VM double clicking on windows opens it up anyway, but if you really do want to make an EXE then the above methods should work.

Many years ago Microsoft use to be able to generate exe from java code, but I do not believe that Eclipse has this feature.

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