开发者

How to change JAR icon on mac?

I have a JAR file on my mac called Test.jar, and the file works perfectly fine when I click on it. All it does is it just opens a small window, and displays "Test", so it's a simple application (I am new to Java programming).

My question is how do I change the icon of the jar file to a different icon of my choice? I have yet to figure this out on my开发者_Go百科 own, and I don't know what to do. Like I have already stated, I am using a mac, so MS Windows methods are probably different from what I have to do.


If you want to change the icon of the jar and/or an alias that points to it, you can use this method (works on Catalina):

  1. Right-click on the jar in Finder, click Get Info.
  2. Drag your icon to the top left of the info window (a plus sign will appear in the moving cursor).
  3. You can make an alias of the jar. This will show the same new icon.

Remarks:

  1. The icon must be a .icns file.
  2. Online converter to .icns: https://cloudconvert.com/png-to-icns.
  3. You have to repeat the procedure each time the jar is build.


As the linked answer indicates, this is platform specific. OSX does allow you to easily package the java application as a native OSX app, though. See http://www.oracle.com/technetwork/articles/javase/javatomac3-137430.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜