my dog learned polymorphism
The moose likes Other Java Products and Servers and the fly likes Anyone used Java Service Wrapper by Tanuki Software? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Anyone used Java Service Wrapper by Tanuki Software?" Watch "Anyone used Java Service Wrapper by Tanuki Software?" New topic

Anyone used Java Service Wrapper by Tanuki Software?

Doug Esser

Joined: Aug 03, 2008
Posts: 4
I want to have a program run in the background of Windows NT and perform some functions at certain scheduled times during the day. From reading other posts I've settled on using the Java Service Wrapper from Tanuki Software.

To make sure I understand how this works, I wrote a simple program that uses Timer and TimerTask to display a message on a JFrame every 5 minutes.

The program works in JAVA. I also followed the directions on the Tanuki website and can get the program to work using the wrapper in console mode. I can even install and start the program as a windows service. However, once I start it in services mode nothing happens. No message ever displays.

Any idea what could be going on? Unfortunately there are no error messages to give clues, and when I check the services menu in the Applications folder of the Control Panel, everything looks good.
Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
I'm not a GUI programmer so this is just a guess but as services are designed to run as soon as a machine boots up - even before anyone logs in, I would be surprised if you could include a GUI in a wrapped program - where would you expect a JFrame to open if there is nobody logged in and hence no desktop ?

Unless someone comes up with another suggestion, I'd try taking out the JFrame and just writing the messages to a file to start with.

Doug Esser

Joined: Aug 03, 2008
Posts: 4
Joanne, thank you. Writing to a text file does indeed work!

I don't understand the explanation, though. If I boot up at say 8:00 a.m. and my JAVA scheduler is set to display the GUI at 12:00 p.m., at which point I am still logged on, then why wouldn't it display the JFrame then?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

The service doesn't have a screen to display anything on. You might be logged on, in which case you have a screen, but that doesn't affect the service in any way. It still doesn't have a screen.
Pallavi Joshi

Joined: Oct 20, 2010
Posts: 14
Hi, I may be wrong.. but we use service wrapper for silent processes like backups, or some update Jobs. when i had configured service which is written in java it was working fine. It was just processing of some code and updates to database.

Try windows scheduled process batch files to open program and add condition if user is logged in. It may work.

I agree. Here's the link:
subject: Anyone used Java Service Wrapper by Tanuki Software?
It's not a secret anymore!