You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Gridinas, Mantas" <Ma...@storebrand.no> on 2021/09/06 10:54:56 UTC

RE: [daemon] Escaping the colon

Sadly it did not. I've worked around it using the environment variables, which do permit the escaping.

-----Original Message-----
From: Gary Gregory <ga...@gmail.com> 
Sent: Saturday, August 21, 2021 16:22
To: Commons Users List <us...@commons.apache.org>
Subject: Re: [daemon] Escaping the colon

Did that fix it?

Gary

On Tue, Aug 17, 2021, 03:28 Mark Thomas <ma...@apache.org> wrote:

> Please try again with single quotes rather than double quotes. i.e.
>
> -Dfoo='bar;zar'
>
> Mark
>
>
> On 17/08/2021 07:43, Gridinas, Mantas wrote:
> > I did test that prior writing the message. Result was the following:
> >
> > -Dfoo=bar
> > zar
> >
> > -----Original Message-----
> > From: Gary Gregory <ga...@gmail.com>
> > Sent: Monday, August 16, 2021 19:17
> > To: Commons Users List <us...@commons.apache.org>
> > Subject: Re: [daemon] Escaping the colon
> >
> > What happens if you say:
> >
> > -Dfoo="bar;zar"
> >
> > Gary
> >
> > On Mon, Aug 16, 2021, 11:54 Gridinas, Mantas <
> Mantas.Gridinas@storebrand.no>
> > wrote:
> >
> >> Hi!
> >>
> >> I've come into a bit of a pickle. I'm trying to pass the following 
> >> value as my argument for a system property -Dfoo=bar;zar Which 
> >> results in the following usage of ++StartParams
> >> ++StartParams=-Dfoo=bar;zar
> >>
> >> In my JVM I am using `System.getProperty("foo")` to read the the 
> >> expected value of "bar;zar", but instead procsrv.exe considers that 
> >> zar should be a different argument which in turn causes the 
> >> java.exe think that zar is the main class name for application 
> >> instead. How do I go about escaping the colon in startparams?
> >>
> >> Cheers!
> >> // Mantas
> >>
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

RE: [daemon] Escaping the colon

Posted by "Gridinas, Mantas" <Ma...@storebrand.no>.
Aye, it's a bit complicated. We deploy to windows server 2012 which runs powershell 4, but all of development  is on windows 10 2h02 which runs powershell 7. So there might be some disparity there. Still, I am a bit upset that windows specific JDKs do not include the integration with windows service infrastructure and we need these weird workarounds like apache daemon or NSSM.

-----Original Message-----
From: Gary Gregory <ga...@gmail.com> 
Sent: Monday, September 6, 2021 16:26
To: Commons Users List <us...@commons.apache.org>
Subject: Re: [daemon] Escaping the colon

Windows and Linux shells treat different quotes differently, so that's another thing to watch out for when asking questions and answering them ;-)

I have no idea what OS you are on and which one Mark assumed while replying!

Gary

On Mon, Sep 6, 2021, 06:55 Gridinas, Mantas <Ma...@storebrand.no>
wrote:

> Sadly it did not. I've worked around it using the environment 
> variables, which do permit the escaping.
>
> -----Original Message-----
> From: Gary Gregory <ga...@gmail.com>
> Sent: Saturday, August 21, 2021 16:22
> To: Commons Users List <us...@commons.apache.org>
> Subject: Re: [daemon] Escaping the colon
>
> Did that fix it?
>
> Gary
>
> On Tue, Aug 17, 2021, 03:28 Mark Thomas <ma...@apache.org> wrote:
>
> > Please try again with single quotes rather than double quotes. i.e.
> >
> > -Dfoo='bar;zar'
> >
> > Mark
> >
> >
> > On 17/08/2021 07:43, Gridinas, Mantas wrote:
> > > I did test that prior writing the message. Result was the following:
> > >
> > > -Dfoo=bar
> > > zar
> > >
> > > -----Original Message-----
> > > From: Gary Gregory <ga...@gmail.com>
> > > Sent: Monday, August 16, 2021 19:17
> > > To: Commons Users List <us...@commons.apache.org>
> > > Subject: Re: [daemon] Escaping the colon
> > >
> > > What happens if you say:
> > >
> > > -Dfoo="bar;zar"
> > >
> > > Gary
> > >
> > > On Mon, Aug 16, 2021, 11:54 Gridinas, Mantas <
> > Mantas.Gridinas@storebrand.no>
> > > wrote:
> > >
> > >> Hi!
> > >>
> > >> I've come into a bit of a pickle. I'm trying to pass the 
> > >> following value as my argument for a system property 
> > >> -Dfoo=bar;zar Which results in the following usage of 
> > >> ++StartParams
> > >> ++StartParams=-Dfoo=bar;zar
> > >>
> > >> In my JVM I am using `System.getProperty("foo")` to read the the 
> > >> expected value of "bar;zar", but instead procsrv.exe considers 
> > >> that zar should be a different argument which in turn causes the 
> > >> java.exe think that zar is the main class name for application 
> > >> instead. How do I go about escaping the colon in startparams?
> > >>
> > >> Cheers!
> > >> // Mantas
> > >>
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: user-help@commons.apache.org
> > >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
> >
>

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


Re: [daemon] Escaping the colon

Posted by Gary Gregory <ga...@gmail.com>.
Windows and Linux shells treat different quotes differently, so that's
another thing to watch out for when asking questions and answering them ;-)

I have no idea what OS you are on and which one Mark assumed while
replying!

Gary

On Mon, Sep 6, 2021, 06:55 Gridinas, Mantas <Ma...@storebrand.no>
wrote:

> Sadly it did not. I've worked around it using the environment variables,
> which do permit the escaping.
>
> -----Original Message-----
> From: Gary Gregory <ga...@gmail.com>
> Sent: Saturday, August 21, 2021 16:22
> To: Commons Users List <us...@commons.apache.org>
> Subject: Re: [daemon] Escaping the colon
>
> Did that fix it?
>
> Gary
>
> On Tue, Aug 17, 2021, 03:28 Mark Thomas <ma...@apache.org> wrote:
>
> > Please try again with single quotes rather than double quotes. i.e.
> >
> > -Dfoo='bar;zar'
> >
> > Mark
> >
> >
> > On 17/08/2021 07:43, Gridinas, Mantas wrote:
> > > I did test that prior writing the message. Result was the following:
> > >
> > > -Dfoo=bar
> > > zar
> > >
> > > -----Original Message-----
> > > From: Gary Gregory <ga...@gmail.com>
> > > Sent: Monday, August 16, 2021 19:17
> > > To: Commons Users List <us...@commons.apache.org>
> > > Subject: Re: [daemon] Escaping the colon
> > >
> > > What happens if you say:
> > >
> > > -Dfoo="bar;zar"
> > >
> > > Gary
> > >
> > > On Mon, Aug 16, 2021, 11:54 Gridinas, Mantas <
> > Mantas.Gridinas@storebrand.no>
> > > wrote:
> > >
> > >> Hi!
> > >>
> > >> I've come into a bit of a pickle. I'm trying to pass the following
> > >> value as my argument for a system property -Dfoo=bar;zar Which
> > >> results in the following usage of ++StartParams
> > >> ++StartParams=-Dfoo=bar;zar
> > >>
> > >> In my JVM I am using `System.getProperty("foo")` to read the the
> > >> expected value of "bar;zar", but instead procsrv.exe considers that
> > >> zar should be a different argument which in turn causes the
> > >> java.exe think that zar is the main class name for application
> > >> instead. How do I go about escaping the colon in startparams?
> > >>
> > >> Cheers!
> > >> // Mantas
> > >>
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: user-help@commons.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
> >
>