[英]Restart Java Swing application
I want to introduce update and rollback feature for my Java swing application. 我想为我的Java swing应用程序引入更新和回滚功能。 First I am trying to use two jar
files and one will be updating other and exit. 首先,我尝试使用两个jar
文件,一个将更新另一个jar
文件并退出。
This attempt was successful, but the problem is that I can't set the icon image for my application for MAC OS
. 尝试成功,但是问题是我无法为MAC OS
应用程序设置图标图像。 The next attempt is used single jar file and use system process to rename the running jar file and run the updated jar
file. 下次尝试使用单个jar文件,并使用系统进程重命名正在运行的jar文件并运行更新的jar
文件。 But I not familiar with system commands and I don't know how to integrate these commands with Java application ( ProcessBuilder
). 但是我不熟悉系统命令,也不知道如何将这些命令与Java应用程序( ProcessBuilder
)集成在一起。
Is there any solution to set icon for jar files? 有什么解决方案可以为jar文件设置图标吗?
Jarbuddler
is useful but it won't help in my case(Two jar
file - Launcher
, Application
) Jarbuddler
是有用的,但它不会在我的情况下帮助(二jar
文件- Launcher
, Application
)
Or 要么
Can you please provide a solutuion with "System process". 您能否提供“系统过程”的解决方案。 Is there any problem for using the command , ie OS versions? 使用该命令是否存在任何问题,即OS版本?
Please advise. 请指教。
The Dock 码头
The com.apple.eawt.Application class includes the following methods for managing your Java application's Dock icon: com.apple.eawt.Application类包含以下用于管理Java应用程序的Dock图标的方法:
public java.awt.Image getDockIconImage()
public void setDockIconImage(java.awt.Image)
public java.awt.PopupMenu getDockMenu()
public void setDockMenu(java.awt.PopupMenu)
public void setDockIconBadge(String)
https://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/07-NativePlatformIntegration/NativePlatformIntegration.html https://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/07-NativePlatformIntegration/NativePlatformIntegration.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.