I took a quick look at the w32 service spec an it looks like you can
embed arguments in the "path" parameter when setting up the service,
so you could potentially do away with the C wrapper entirely (unless
the msdev docs are incorrect).
On Sep 10, 2007, at 9:49 AM, Thomas Börkel wrote:
HI!
Timothy Wall wrote:
It'd be really cool to include a Java w32 service wrapper (perhaps
as an
abstract class) in the JNA contrib area.
I'll look into that.
Is your minimal C wrapper
required to launch java.exe, or would it be possible to install the
Yep.
service without it? I notice some service definitions have both
an .exe
and arguments defined, so it seems like that should be possible
for java
(e.g. java.exe -classpath ... <classname>).
You can define arguments for services, that's right. But those
arguments
are being passed to the service main callback, not to the .exe that is
defined for the service in the registry. That .exe is being started
without parameters. But maybe some trick can be done. I'll check
that too.