Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java exe launcher with support for Windows 7

The Problem

Currently I use exe4j 4.4.2 to wrap our client app in a Windows native executable, but the result does not integrate with Windows 7 so well.

For example: When I right click in the task bar it only offers a pop-up to close the application but no pinning. Eclipse' Equinox launcher on the other hand does that with bravado.

I'm looking for a java exe launcher which has the following features:

  • Wraps jars in Windows native executables (no Java Web Start or similar)
  • Doesn't extract the jar from the executable
  • Doesn't need write access in "Program Files"
  • Uses executable filename as process name (only one process)
  • Integrates well with Windows 7 (esp. pinning in the taskbar)
  • Allows setting of JVM arguments (esp. heap size)
  • Flexible customization for JRE search
  • Lightweight
  • Actively maintained
  • Integrates well in Ant build
  • Preferably free

I have checked the following:

exe4j

  • Windows 7 integration lacking
  • It's not expensive but ordering and distribution of licenses to the build machines is a pain.
  • JRE search not flexible enough

Eclipse Equinox

  • Not lightweight
  • Seems to do everything I want, except that I have no idea how to use it with a non-eclipse-based app.
  • Can I use it outside of OSGI, PDE-Build world?

WinRun4J

  • JRE search not well documented
  • Seems not widely used despite incredible feature set, what am I missing?

Launch4J

  • Doesn't support setting the process name in Windows 7 (Bug ID 3353972). There is a patch (Bug ID 1670471) but it has been rejected with reference to jliftoff which is dead.
  • JRE search not flexible enough.

JSmooth

  • Seems not to be actively maintained.
  • Latest release is from 2007, well before Windows 7.

Are there any other options? Is there a chance to use the Eclipse launcher with a non Eclipse-base application?

like image 867
bbuser Avatar asked Aug 17 '11 11:08

bbuser


2 Answers

Try Advanced Installer http://www.advancedinstaller.com/java.html (There is a free edition available in this).

like image 112
Ravindra Gullapalli Avatar answered Nov 15 '22 06:11

Ravindra Gullapalli


I'm happy with WinRun4J. The JRE search works fine for me. It sometimes chokes especially on 64bit systems if multiple JREs and JDKs are installed and registered in the Windows registry, but this can usually be fixed by supplying the correct path in the corresponding .ini file.

I did not use Launch4J because it creates a new (temporary) .exe in the JRE installation folder which seems a bit strange to me. The advantage of that method is, that it can use a single .exe for both 32 and 64 bit JVMs though

like image 1
a_horse_with_no_name Avatar answered Nov 15 '22 05:11

a_horse_with_no_name