You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by SerFingolfin <pa...@gmail.com> on 2008/09/18 10:44:59 UTC
Tomcat as Windows service and output window
Hi to everybody!
I installed Tomcat as service in Windows XP.
In my application i use java.awt.TrayIcon to show an icon in system Traybar.
If i start tomcat (as service) without checking "allow service interact with
Desktop" i don't see my icon on system traybar. Checking that flag makes my
icon appear and working well, but tomcat's output window also appears...is
there a way to hide it?
Thanks in advance.
--
View this message in context: http://www.nabble.com/Tomcat-as-Windows-service-and-output-window-tp19548553p19548553.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat as Windows service and output window
Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message -----
From: "SerFingolfin" <pa...@gmail.com>
To: <us...@tomcat.apache.org>
Sent: Thursday, September 18, 2008 5:29 PM
Subject: Re: Tomcat as Windows service and output window
>
> Thanks for your help!
> But that's not so easy doing that...
> I was wondering how Netbeans can make my traybar work
> hiding tomcat's output window at the same time!
> And not only hide : they can redirect tomcat's output to a text area
> inside the IDE...
Netbeans doesnt start TC as a service?
Its probably starting TC with
JavaW
ie Java (shows terminal)
JavaW (does not)
A windows service is a different animal that starts TC thru a JVM.dll
Netbeans is capturing the PrintStream... google for PrintStream System
Because a normal user started NB... the processes are running in that users
name and they have desktop rights...
A service does not (windows thing) unless "allow whatever" is set.
So all NB is doing is
JavaW tomcat
Capture printstream
I'm not sure how much you can see in the ant script... but how they launch
TC is probably there...
A service... is a different story... because they run even when no one has
logged on...
... something like that ;)
Linux is much easier... same trick with a little & behind it ;)
Have fun ;)
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat as Windows service and output window
Posted by SerFingolfin <pa...@gmail.com>.
Thanks for your help!
But that's not so easy doing that...
I was wondering how Netbeans can make my traybar work
hiding tomcat's output window at the same time!
And not only hide : they can redirect tomcat's output to a text area
inside the IDE...
--
View this message in context: http://www.nabble.com/Tomcat-as-Windows-service-and-output-window-tp19548553p19555546.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat as Windows service and output window
Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message -----
From: "SerFingolfin" <pa...@gmail.com>
To: <us...@tomcat.apache.org>
Sent: Thursday, September 18, 2008 10:44 AM
Subject: Tomcat as Windows service and output window
>
> Hi to everybody!
> I installed Tomcat as service in Windows XP.
> In my application i use java.awt.TrayIcon to show an icon in system
> Traybar.
> If i start tomcat (as service) without checking "allow service interact
> with
> Desktop" i don't see my icon on system traybar. Checking that flag makes
> my
> icon appear and working well, but tomcat's output window also appears...is
> there a way to hide it?
> Thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/Tomcat-as-Windows-service-and-output-window-tp19548553p19548553.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
Interesting....
I think you probably into a little Win32 API....
I vaguely remember ShowWindow(yada blah)...
and there is a way in Win32 to also get the window handle from the window
name... I've forgotten..
so thats a little JNI
I dont think its too easy....
Another rather weird way of maybe tackling it... is that Java as a JavaW
variation on windows...
JavaW starts a java program without a window... so a little messing around
with BAT files will let you see if the task bar still works with that... I
imagine it does...
Then just leave the service as a service... because it runs without a
user.... or dont use a service at all and start TC from the RUN folder in
windows....
But then you are going to have to add something to you task bar to let the
guy shut it down... a process to shutdown.bat because the use is blind...
Then the service itself in tomacat is a program called Procrun... in fact
its just renamed to TomcatW...
it doesnt work with java in works with java's dll.... ie its starting the
bootstrap classes from C code....
But you can redirect that to any java class you like with the right
interface.... so you could start your SuperTaskBarJava.class... it does a
JavaW tomcat... or startup bat calling JavaW.... and then if the user closes
the services... your SuperTaskBarJava.class will do it...
... Take your pick... I think they all lots of work ;)
Hopefully one idea there works.... have fun ;)
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org