Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tray Icon is not diplayed when java app start from task scheduler.

Status
Not open for further replies.

AlexandrosG

IS-IT--Management
Dec 4, 2007
23
GR
Hi!
I have developed a (non-swing) java application that uses a TrayIcon with a popup menu.

- When i execute the jar with double click everything is ok.
- When i execute the jar through a .bat file (double click the .bat) everything is ok.
- When i execute the .bat file through task scheduler (as the user with which i login) the java application starts but the tray icon is not there!! In this case the process that corresponds to the application is not shown in task manager for the current user (me). It shows only if i choose "Show processes from all users", even though the user name of the task is me again!

Any ideas why this is happening?
 
Maybe you should ask in the forum related to your OS, as I think this has very little to do with Java.

Cheers,
Dian
 
The app is not running on your desktop, as when it's run from the taskscheduler, it runs in a totally different context. Like you've logged in again from a RDP session. So it's probably popping up from a systemtray, but on a screen you can't see...
 
Hmmm, i don't like it (if ithappens) but ... it makes sense!
 
You can make the trayicon part of the software interact with the service part of your software, but they will be two different applications, that can't interact directly. It has to be connected from the trayicon part to the service, and then the service can push it's state through this connection.
If done right the trayicon part can even run on a different computer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top