What's the best way to start Java applications on Windows 7?

佐手、 提交于 2019-11-28 03:15:54

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.

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.

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.

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?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!