On Windows you can simply double click the JAR file to start the application. Installed JRE doesn't matter, simply works. Instead of using a batch file it is possible to only create a shortcut to start the application. Is there another solution which fulfills all the requirements from above? Or are there any tricks to solve the problems with the mentioned solutions? After solving the taskbar-pinning problem using Launch4j looks like the best solution.
Launch4j can easily be integrated into a Maven project With this or this plugin , configuration is pretty easy and everything works out of the box except taskbar pinning. For taskbar-pinning the Java application must set an appModelUserId as explained in the answer to this question.
Additionally the Java application must be installed by an installer which must at least install one shortcut pointing to the EXE. This shortcut must also contain the appModelUserId. For some unknown reason this shortcut only has to exist. You don't have to use it. You can double-click the EXE and taskbar-pinning still works. You can even create the shortcut in some subfolder of your application folder. Taskbar-pinning stops working when the last shortcut of the EXE file is removed.
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. 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. 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 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? 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.
Oracle has a tutorial on how to use the system tray. That's Java SE 6 related Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. What's the best way to start Java applications on Windows 7? Ask Question. Asked 9 years, 11 months ago. Active 8 years, 10 months ago. Viewed 21k times. This means: When the application is running it must be possible to pin the application to the taskbar.
It must be possible to associate data files with the application so Windows opens these files with my application. Must automatically work with the 32 bit Java Runtime and with the 64 bit Java runtime. So when the user uninstalls a 32 bit Java and installs a 64 bit Java instead Or vice-versa then my application must still work.
Must support large fonts setting of Windows. I don't really understand this feature. I just know that some applications ignore it completely, others Like Google Chrome are pixel-scaled Looks really ugly and others support it by simply using larger fonts as intended That's what I want and normally it works. Only the WinRun4J solution mentioned below doesn't work with it.
Problems: Doesn't support large fonts. Application window is pixel-scaled instead Like Google Chrome. This isn't user-friendly because the user doesn't understand why he must use the 32 bit EXE on a 64 bit operating system when only a 32 bit JRE is installed.
Problems: Can't pin the application to the taskbar. Problems: Application can't be pinned to the taskbar. Can't create a shortcut in the start menu. Can't associate files with a JAR file. Problems: A DOS window pops up when the application is started.
The batch file doesn't know where javaw. When associating files with the batch file then no custom icon can be set. Taskbar support isn't working properly.
Application can be pinned to it when the batch file is started manually but when double clicking an associated file instead then it doesn' work. Shortcut Instead of using a batch file it is possible to only create a shortcut to start the application. LNK files don't work. Question Is there another solution which fulfills all the requirements from above?
Solution After solving the taskbar-pinning problem using Launch4j looks like the best solution. Improve this question. Community Bot 1 1 1 silver badge. Is that really so terrible for users? I know that Sysinternals ProcessExplorer runs from one exe on both platforms, but they simply packed x64 version into x Also, take a look on Launch4j , maybe it will fit your requirements. Mersenne: When this decision depends on the operating system then it isn't a problem. Users download the 64 bit version of the application because they have a 64 bit Windows.
And then they complain the application isn't working because their Windows was pre-installed by some hardware vendor with a 32 bit Java. And even when they choose the 32 bit application Or the installer makes this decision automatically then the application still breaks when the user replaces the 32 bit JRE with a 64 bit JRE. Yes, that is real problem : We can think about JRE as just a bunch of libraries that needed by our app. But for user it is not so clear. Aca la foto.
Aca la foto windows 7 starter compatiendo y accediendo a recursos en una red local LAN. Respuesta : no , en realidad Aero no es un tema theme.
Aca una foto para que vean. Etiquetas: informatica , mitos , verdades , windows 7 , windows starter , windows xp. Unknown 9 de octubre de , Gabriel Softwares 12 de octubre de , Unknown 29 de octubre de , Gabriel Softwares 29 de octubre de , Unknown 7 de enero de ,
0コメント