INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

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

(OP)
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?

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

Maybe you should ask in the forum related to your OS, as I think this has very little to do with Java.

Cheers,
Dian

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

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...

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

(OP)
Hmmm, i don't like it (if ithappens) but ... it makes sense!  

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

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...

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

(OP)
Interesting! I would give it a shot...later! smile

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close