java 1.6 SystemTray图标不会出现在Windows启动时 [英] java 1.6 SystemTray icon does not appear on windows startup

查看:231
本文介绍了java 1.6 SystemTray图标不会出现在Windows启动时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java 1.6桌面应用程序,从Windows XP上的批处理文件开始使用javaw。此批处理文件有一个.lnk链接,该文件放在Windows Startup文件夹中,以便在每次系统启动时启动此应用程序。
应用程序使用SystemTray类在系统托盘上显示图标,以防它运行。手动启动此应用程序没有问题。如果它是由Windows启动过程启动的,则没有显示图标(甚至不是空白图标),但应用程序正在运行。启动过程也放慢了速度。
如何克服这个问题?
谢谢!

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!

推荐答案

您是在系统启动时还是在用户登录时启动Java应用程序?如果您在用户登录之前启动应用程序,则可能没有要连接的系统托盘,因为系统托盘与用户会话相关联。

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.

如果在用户登录之前不需要运行Java应用程序,将快捷方式移动到用户(或所有用户)的自动启动文件夹可能会有所帮助。

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.

这篇关于java 1.6 SystemTray图标不会出现在Windows启动时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆