Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to package executable JAR file into EXE

I would like to deploy my final build as an EXE with an application Icon.

What is the best way to do this? What is the common practice?

like image 812
Aman Avatar asked Jun 18 '13 19:06

Aman


People also ask

How do I change a JAR file to an executable file?

In Windows File Explorer, select Tools->Folder Options... Click File Types tab and select JAR Executable Jar File option. Click Advanced or Change.

How do I unpack an executable JAR file?

Type in jar xf followed by a space followed by the name of the JAR file. This is the command to extract a JAR file. For example, to extract a JAR file called "minecraft", you would type in jar xf minecraft. jar .

Can Java be compiled to exe?

Using GraalVM Java applications can be compiled into native standalone executables (will be demonstrated). Native executables of small Java programs startup blazingly fast, use considerably less resources compared to running on JVM and do not even require the JRE or any other kind of runtime apart from the OS.


1 Answers

Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one, and it's possible to set runtime options, like the initial/max heap size. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.

http://launch4j.sourceforge.net/

like image 80
Motiejus Osipovas Avatar answered Nov 03 '22 19:11

Motiejus Osipovas