• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Anyone used Java Service Wrapper by Tanuki Software?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marshal
Posts: 28263
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Regards,
Pallavi
 
Seriously? That's what you're going with? I prefer this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic