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 2开发者_运维百科007, well before Windows 7.
Are there any other options? Is there a chance to use the Eclipse launcher with a non Eclipse-base application?
Try Advanced Installer http://www.advancedinstaller.com/java.html (There is a free edition available in this).
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
It sounds to me like you just need to go with Launch4J. The process name matches the .exe name that you launch with. A great example of a program that is wrapped this way is "Keystore Explorer 4.01".
I would create a bat file. Wrap this bat file into a exe. You can create an exe with an icon and everything. Try this bat to exe converter:
http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html
In this way, you have better control. The size of the exe is very small.
Edit: Also, the creation of the exe is one time thing.
精彩评论