I want to publish a Java GUI application on Windows 7. This application is using the Swing Toolkit and doesn\'t need any native code. The application
Java Web Start - I wouldn't consider distributing an application any other way, these days.
The user does need to have at least J2SE 1.4; if your applications needs a later version, Web Start will automatically download an appropriate JRE.
See the JNLP reference for the tags for desktop integration (shortcut
and offline-allowed
), and file associations (association
). These are only supported in WS 1.5 though.
Try Launch4j (http://launch4j.sourceforge.net/), its a simple jar to exe wrapper (actually wrapping the jar is optional). It should solve your Icon and Taskbar requirements. Its also capable locating installed JRE's (some configurable rules). The font problem I don't quite get, Swing should automatically use fonts depending on Windows settings, unless you somehow overwrite that in the JRE options or in code.
As an aside, also check out the new feature to have your app in the tooltray/systemtray:
Oracle has a tutorial on how to use the system tray.
That's Java SE 6 related....makes me also winder what other goodies might be in the newer Java 7?
I personaly use Launch4j (through maven with the maven-launch4j-plugin to be even more precise), and I implement the system tray management from within my application... (See http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/).
I've had good success with WinRun4J overall, but I haven't really done much with fonts, so I'll confess I'm not sure I understand why you're having the issue you describe there.
From what you describe, however, it sounds like you have very specific requirements from a Java native launcher. Why not just write your own? You could start with something like WinRun4J (which is open source, licensed under the Eclipse CPL) and just modify it to your needs.
Alternatively, you could look into the native launchers used by other programs. The Eclipse and NetBeans launchers both seem to work pretty well, and both are open source. You might be able to adapt one of them pretty easily as well.