To minimize the java window tosystem tray

Discussion in 'Java' started by Percy, May 5, 2006.

  1. Percy

    Percy Guest

    I am programming a application which is based on socket .

    And i want that it starts at system startup and a method which can
    minimize the java frame to system tray so that the client can't notice
    it .

    Or i want that it even can't be at system tray ,it should be hidden
    process like the processes which we see in task manager's processes
    tab.And one more thing how i can make the process in a waythat it cant
    be stopped ,like explorer.exe,and if someone end it the system also
    gets shutdown.
     
    Percy, May 5, 2006
    #1
    1. Advertising

  2. Percy

    Oliver Wong Guest

    "Percy" <> wrote in message
    news:...
    >I am programming a application which is based on socket .
    >
    > And i want that it starts at system startup and a method which can
    > minimize the java frame to system tray so that the client can't notice
    > it .


    Java 1.6, which is coming out soon, is supposed to have support for the
    system tray.


    > Or i want that it even can't be at system tray ,it should be hidden
    > process like the processes which we see in task manager's processes
    > tab.


    Isn't this just like writing a regular Swing application, except you
    never actually call setVisible(true)?

    >And one more thing how i can make the process in a waythat it cant
    > be stopped ,like explorer.exe,and if someone end it the system also
    > gets shutdown.


    Not sure that it can be done in a platform independent way. Sounds like
    you're mostly interested in Windows though. Maybe use JNI in combination
    with http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c8647/

    - Oliver
     
    Oliver Wong, May 5, 2006
    #2
    1. Advertising

  3. Percy wrote:
    > I am programming a application which is based on socket .
    >
    > And i want that it starts at system startup and a method which can
    > minimize the java frame to system tray so that the client can't notice
    > it .
    >
    > Or i want that it even can't be at system tray ,it should be hidden
    > process like the processes which we see in task manager's processes
    > tab.


    It sounds like you want to write a daemon. For Linux-like platforms,
    you just need to write a script or two to start and stop your program,
    and put the script in the appropriate rc file directory. For Windows,
    you'll need to register your program as a Windows Service. JET claims
    to help with this: http://www.excelsior-usa.com/kb/000019.html

    > And one more thing how i can make the process in a waythat it cant
    > be stopped ,like explorer.exe,and if someone end it the system also
    > gets shutdown.


    That's not how explorer works. A redundant process (or possibly part of
    the kernel) polls the Windows shell (explorer.exe) periodically, and if
    the process doesn't respond, it gets restarted. This doesn't seem to
    work particularly well on my own XP boxes.

    Intentionally bringing down the whole system when your program crashes
    sounds like a spectacularly bad idea. Like Darwin Award bad. Would you
    please post a quick description of why you want this? My curiosity is
    piqued.
     
    Jeffrey Schwab, May 6, 2006
    #3
  4. Percy

    Rhino Guest

    "Jeffrey Schwab" <> wrote in message
    news:MtR6g.16106$...
    > Percy wrote:
    >> I am programming a application which is based on socket .
    >>
    >> And i want that it starts at system startup and a method which can
    >> minimize the java frame to system tray so that the client can't notice
    >> it .
    >>
    >> Or i want that it even can't be at system tray ,it should be hidden
    >> process like the processes which we see in task manager's processes
    >> tab.

    >
    > It sounds like you want to write a daemon. For Linux-like platforms, you
    > just need to write a script or two to start and stop your program, and put
    > the script in the appropriate rc file directory. For Windows, you'll need
    > to register your program as a Windows Service. JET claims to help with
    > this: http://www.excelsior-usa.com/kb/000019.html
    >
    >> And one more thing how i can make the process in a waythat it cant
    >> be stopped ,like explorer.exe,and if someone end it the system also
    >> gets shutdown.

    >
    > That's not how explorer works. A redundant process (or possibly part of
    > the kernel) polls the Windows shell (explorer.exe) periodically, and if
    > the process doesn't respond, it gets restarted. This doesn't seem to work
    > particularly well on my own XP boxes.
    >
    > Intentionally bringing down the whole system when your program crashes
    > sounds like a spectacularly bad idea. Like Darwin Award bad. Would you
    > please post a quick description of why you want this? My curiosity is
    > piqued.


    Perhaps he has mischief in mind; some kind of attack on recipients of a
    virus for example. It's hard to think of a GOOD reason for doing what he
    wants to do.

    --
    Rhino
     
    Rhino, May 6, 2006
    #4
  5. Percy

    Alun Harford Guest

    "Rhino" <> wrote in message
    news:f217g.4748$...
    >
    > "Jeffrey Schwab" <> wrote in message
    > news:MtR6g.16106$...
    >> Percy wrote:
    >>> I am programming a application which is based on socket .
    >>>
    >>> And i want that it starts at system startup and a method which can
    >>> minimize the java frame to system tray so that the client can't notice
    >>> it .
    >>>
    >>> Or i want that it even can't be at system tray ,it should be hidden
    >>> process like the processes which we see in task manager's processes
    >>> tab.

    >>
    >> It sounds like you want to write a daemon. For Linux-like platforms, you
    >> just need to write a script or two to start and stop your program, and
    >> put the script in the appropriate rc file directory. For Windows, you'll
    >> need to register your program as a Windows Service. JET claims to help
    >> with this: http://www.excelsior-usa.com/kb/000019.html
    >>
    >>> And one more thing how i can make the process in a waythat it cant
    >>> be stopped ,like explorer.exe,and if someone end it the system also
    >>> gets shutdown.

    >>
    >> That's not how explorer works. A redundant process (or possibly part of
    >> the kernel) polls the Windows shell (explorer.exe) periodically, and if
    >> the process doesn't respond, it gets restarted. This doesn't seem to
    >> work particularly well on my own XP boxes.
    >>
    >> Intentionally bringing down the whole system when your program crashes
    >> sounds like a spectacularly bad idea. Like Darwin Award bad. Would you
    >> please post a quick description of why you want this? My curiosity is
    >> piqued.

    >
    > Perhaps he has mischief in mind; some kind of attack on recipients of a
    > virus for example. It's hard to think of a GOOD reason for doing what he
    > wants to do.


    Indeed. I can't think of any legitimate reason to do this.
    Part of me thinks it would be appropriate to inform the India authorities.

    Alun Harford
     
    Alun Harford, May 6, 2006
    #5
  6. Percy

    Chris Uppal Guest

    Percy wrote:

    > Or i want that it even can't be at system tray ,it should be hidden
    > process like the processes which we see in task manager's processes
    > tab.And one more thing how i can make the process in a waythat it cant
    > be stopped ,like explorer.exe,and if someone end it the system also
    > gets shutdown.


    If you don't know enough about Windows system programming to be able to do this
    without help, then you /definitely/ don't know enough to be trusted to create
    such a dangerous program.

    BTW, why ask a bunch of Java programmers about Windows system programming ? I
    suppose there may be a few Win32 experts here, but it's not the place you'd
    expect to find many.

    -- chris
     
    Chris Uppal, May 7, 2006
    #6
  7. Percy

    Oliver Wong Guest

    "Rhino" <> wrote in message
    news:f217g.4748$...
    >
    > "Jeffrey Schwab" <> wrote in message
    > news:MtR6g.16106$...
    >> Percy wrote:
    >>> And one more thing how i can make the process in a waythat it cant
    >>> be stopped ,like explorer.exe,and if someone end it the system also
    >>> gets shutdown.

    >>
    >> That's not how explorer works. A redundant process (or possibly part of
    >> the kernel) polls the Windows shell (explorer.exe) periodically, and if
    >> the process doesn't respond, it gets restarted. This doesn't seem to
    >> work particularly well on my own XP boxes.
    >>
    >> Intentionally bringing down the whole system when your program crashes
    >> sounds like a spectacularly bad idea. Like Darwin Award bad. Would you
    >> please post a quick description of why you want this? My curiosity is
    >> piqued.

    >
    > Perhaps he has mischief in mind; some kind of attack on recipients of a
    > virus for example. It's hard to think of a GOOD reason for doing what he
    > wants to do.


    I was at this arcade where there was this touchscreen game. You put in
    quarters and you get to play games that you could otherwise play for free on
    the internet (e.g. tetris, bejeweled, etc.) Anyway, I was just messing
    around with the device, pressing my finger all over the touchscreen as
    quickly as possible when the machine crashed.

    After a few seconds pause, the machine rebooted itself (it was running
    some variant of Linux, for the curious), and got back into the lobby, where
    I was prompted to select a game, and insert money for the priviledge of
    playing the selected game.

    I guess this is more desirable than having me go over to the person who
    gives you change and complain about how the machine swallowed my quarter,
    and having the person stare dumbfoundedly at the frozen machine, with no
    idea how to fix it.

    - Oliver
     
    Oliver Wong, May 8, 2006
    #7
  8. Percy

    anydoby

    Joined:
    Mar 15, 2008
    Messages:
    2
    anydoby, Mar 15, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. a

    Minimize window when Show

    a, Oct 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    523
  2. feng
    Replies:
    1
    Views:
    552
  3. varadha
    Replies:
    2
    Views:
    3,107
    SaltPeter
    Sep 15, 2003
  4. Erik  Bethke
    Replies:
    1
    Views:
    1,892
    Erik Bethke
    Feb 8, 2005
  5. Charles
    Replies:
    0
    Views:
    92
    Charles
    Feb 26, 2006
Loading...

Share This Page