I created the jar executable of my project embedded in eclipse. but when I execute this file, it does not display the icon on the system tray that I added in the project. I am using the following simple code.
Image image = Toolkit.getDefaultToolkit().getImage("src/resources/ChatIcon1.jpeg"); PopupMenu Popup = new PopupMenu(); MenuItem exit = new MenuItem("Exit"); Popup.add(exit); final TrayIcon trayIcon = new TrayIcon(image,"OfficeCommunicator",Popup); trayIcon.setImageAutoSize(true);
source share