commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "H. Ferdinand Nölscher" <ferdin...@noelscher.com>
Subject Re: JSVC Daemon: Pass arguments to application
Date Thu, 15 Mar 2012 16:19:47 GMT
On 15.03.2012 17:08, Konstantin Kolinko wrote:
> 2012/3/15 "H. Ferdinand Nölscher" <ferdinand@noelscher.com>:
>> Hello!
>>
>> I need to pass some arguments to my application, which is using the jsvc
>> daemon loader. How could I possibly do that?
>>
> From the docs:
>> http://commons.apache.org/daemon/jsvc.html
>> ./jsvc -help
>> Usage: jsvc [-options] class [args...]
>
> Those "args..." is what you are asking for.
>
> There is also
>>    -D<name>=<value>
>>        set a Java system property
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

Let's say I run

jsvc [-options] class myargs anotherArgument

I check for arguments with something like:

String[] args = dc.getArguments(); (dc is the DaemonContext)

But that just gives me an empty list.


kind regards,
F. Nölscher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message