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.
Oliver Wong - 05 May 2006 22:22 GMT
>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
Jeffrey Schwab - 06 May 2006 00:46 GMT
> I am programming a application which is based on socket .
>
[quoted text clipped - 5 lines]
> 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.
Rhino - 06 May 2006 13:58 GMT
>> I am programming a application which is based on socket .
>>
[quoted text clipped - 25 lines]
> 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
Alun Harford - 06 May 2006 23:57 GMT
>>> I am programming a application which is based on socket .
>>>
[quoted text clipped - 29 lines]
> 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
Oliver Wong - 08 May 2006 22:38 GMT
>>> 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
[quoted text clipped - 13 lines]
> 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
Chris Uppal - 07 May 2006 09:24 GMT
> 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