Hi Daniel, I followed your way.
I just dont know how to start with java service wrapper. realgagnon
might have some idea on this that he can share with us?
So back to the topic, I managed to add a new service on my pc and it
shows in my services applet. But the service cannot run a jar file, it
throws error that says the service has been stopped because it is
inactive. Actually the program is active. It listens to client's
requests once started. It takes some configuration value from a few
files.
Anyway, i figured out that, windows might expect an exe instead of jar
to execute. So i tried to convert the jar to exe. I did that and the
exe can run. Following that, I edit my registry.. pointing the value
data to the exe i made.
I try again, this time i can see my program's console for a while and
then my program throws error saying that it cannot get the file as if
the file was not even there.
This is weird since i can run the program perfectley with the jar and
the exe but when it involves windows service to run the exe, the file
not found error slap me right on my face.
So, dsjoblom.. /other readers, do u have any idea why this happened and
how i can solve this?
Thinking of other alternatives, I will just copy a shortcut to my
startup folder, but this wont do very well since someone (administrator
in my case) has to log on before the system can run. The administrator
account will have to log on forever... or I might have to consider
another user account dedicated to this thing hmmmm......
ok guys, thanks.
wrote:
> JPractitioner wrote:
> > Hello guys,
> >
> > Does anyone has experience/know how to create a new windows (xp)
> > service that runs a jar file? This issue rises as i need to hide the
> > most of the java implementation in this project before it goes live.
> >
> > So the idea is, to have control on the exceution of the jar from
> > windows windows service console (which the users can define the startup
> > type i.e. manual, automatic, disabled and the running life cycle i.e.
> > start, stop, pause, resume, restart...).
> >
> > so any leads to solving this will be appreciated.
> >
> > Thanks in advance. Have a nice day!
>
> I imagine you would create it like any other windows service. See
> http://support.microsoft.com/kb/q137890/
>
> Regards,
> Daniel Sjöblom