You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jorge Pereira <jc...@inescporto.pt> on 2003/07/30 12:52:51 UTC
Re: help wanted - escaping from quotes
Hi Morten,
First thanks for your replay.
The problem is that if i do as you say (and i have tested this
before) the second URL does not apear in the rmi property and the rmid
can't download the jini classes. So it gives a "no class def found
/net/jini/core/something".
In the sun documentation they say (and that is true) that, whenener
more that one url is neaded one must put the diferent url's in quotes
separated by a space in the refered java.rmi.server.codebase.
The problem is that the jvmargs tag does not do this. I think you
are right. My first atempt was to put as you say, in the ant build.xml
but with no success.
I think this is a bug in the ant <jvmargs> tag, but, until now, i
did not have a response from the ant team.
So if i do:
<jvmarg
value="-Djava.rmi.server.codebase=file:///${basedir}/build/classes/
file:///$basedir/lib/jini/jini-core.jar" />
- jmarg only provides the first url to forked jvm;
and like this:
<jvmarg
value='-Djava.rmi.server.codebase="file:///${basedir}/build/classes/
file:///$basedir/lib/jini/jini-core.jar"' />
- jmarg only provides the first url to forked jvm with the first
quote, so "file:/// is an unknown protocol.
So anymore suggestions ???
Regards,
Jorge Pereira
Morten Mortensen wrote:
>Hi Jorge,
>
>You really want your quotes like -
>
>"-Djava.rmi.server.codebase=file:///${basedir}/build/classes/
>file:///$basedir/lib/jini/jini-core.jar"
>
>- on the command-line!
>
>When you feed in a single "jvmarg" to Ant, the quotes are not necessary
>- in fact, the quotes are *not* part of the file-URL, but does become
part
>of the file-URL; try how things work out without them!
>
>Regards,
> Morten Sabroe Mortensen
>
>
>-----Original Message-----
>From: Jorge Pereira
>To: user@ant.apache.org
>Sent: 29-07-03 17:52
>Subject: help wanted - escaping from quotes
>
>hi,
>
> i have to pass the following argument to a class for RMID download
>of stubs:
>
>-Djava.rmi.server.codebase="file:///${basedir}/build/classes/
>file:///$basedir/lib/jini/jini-core.jar"
>
>the previous line, works fine on the command line.
>
>But in the ant this doesn't work.
>
>I tryed :
>
><jvmarg
>value='-Djava.rmi.server.codebase="file:///${basedir}/build/classes/
>file:///$basedir/lib/jini/jini-core.jar"' />
>
>but i gives me an error like this one :
>
>java.net.MalformedURLException: no protocol:
>"file:///home/mypath/build/classes/
>
>Does anyone tryed this ???
>
>thanks in advance.
>
>Jorge Pereira
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: help wanted - escaping from quotes
Posted by Steve Loughran <st...@iseran.com>.
Jorge.
1. Can I ask why you are not using the <sysproperty> element to set
properties?
<java>
<sysproperty key="java.rmi.server.codebase"
value="file:///${basedir}/build/classes/" />
2. what does ant -verbose say?
> I think this is a bug in the ant <jvmargs> tag, but, until now, i
> did not have a response from the ant team.
>
> So if i do:
> <jvmarg
> value="-Djava.rmi.server.codebase=file:///${basedir}/build/classes/
> file:///$basedir/lib/jini/jini-core.jar" />
> - jmarg only provides the first url to forked jvm;
> and like this:
> <jvmarg
> value='-Djava.rmi.server.codebase="file:///${basedir}/build/classes/
> file:///$basedir/lib/jini/jini-core.jar"' />
> - jmarg only provides the first url to forked jvm with the first
> quote, so "file:/// is an unknown protocol.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org