7

I am trying to make an executable file of my Java Application but I don't know how to do that.

I know how to generate an executable jar file, but I want to make an executable application.

I'm using eclipse indigo to make the java application and to generate the jar file.

How to make the executable?

4

5 回答 5

6

I recommend launch4j to create executables from JAR files.

于 2013-08-27T06:49:58.137 回答
1

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

于 2013-08-27T06:48:36.347 回答
1

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

于 2013-08-27T06:51:43.090 回答
1

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.

于 2013-08-27T06:52:52.873 回答
0

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

于 2013-08-27T06:46:48.600 回答