0

We have JAVA Executable JAR on Window and MAC operating system. Once we run the JAR on MAC, the JAR image is displaying at bottom tool bar. We are managed to change the java coffee image by our app image by below code

if (SystemUtils.IS_OS_MAC) {
    URL iconURL = StatCrew.class.getResource("/images/Logo.png");
    java.awt.Image image = new ImageIcon(iconURL).getImage();
    com.apple.eawt.Application.getApplication().setDockIconImage(image);
}

Once mouse over the icon, it is showing title as 'Java' text. We wants to change it with our application name and we are NOT able to get any way to change it. Can anyone help us to change this 'java' word?

RealSkeptic
  • 33,993
  • 7
  • 53
  • 79
  • Hi, Thanks for the reply, but please note, Image is displaying properly. The issue is with the text displaying once your mouse over the image. Please see my screenshot. 'java' word is displaying on mouse over of the dock icon /image. we want to change it. – Umesh Jadhav Jan 09 '17 at 12:53
  • Yes, my bad. Try reading this then https://developer.apple.com/library/content/documentation/Java/Conceptual/Java14Development/07-NativePlatformIntegration/NativePlatformIntegration.html – AMB Jan 09 '17 at 12:57
  • found an answer to the exact same question, [look here](http://stackoverflow.com/questions/2553941/programatically-setting-the-dockname-java-mac-os-x-jvm-property) – Tom K Jan 09 '17 at 17:38
  • Thanks Tom, We have the tried below code but it is not working. We are using Javafx 8.49 and not the swing. Looks like below code work for Swing based application and not for Javafx. public class Launcher { public static void main(String[] args) { System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Hello World!"); JFrame jframe = new MyJFrame(); jframe.setVisible(true); } } – Umesh Jadhav Jan 10 '17 at 08:23

0 Answers0