java 1.6 SystemTray icon does not appear on windows startup

流过昼夜 提交于 2019-12-19 04:57:08

问题


I have a Java 1.6 desktop application, started with javaw from a batch file on Windows XP. There is a .lnk link to this batch file, which is placed to windows Startup folder in order to start this application on every system boot. The application uses SystemTray class to display an icon on the system tray in case it is running. Starting this application manually there is no problem. If it is started by windows startup process, there is no icon displayed (not even a blank icon), however the application is running. The startup process is also slowed down. How can I overcome this? Thank you!


回答1:


Are you starting the Java application on system boot or on user login? If you start the application before a user is logged in, there will probably be no system tray to attach to, since the system tray is associated with the user session.

If you don't need the Java application to be running before a user is logged in, it might help to move the shortcut to the user's (or all users') autostart folder.



来源:https://stackoverflow.com/questions/1509158/java-1-6-systemtray-icon-does-not-appear-on-windows-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!