Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you specify a system property containing " to Javac?

Status
Not open for further replies.

kmhandle

Programmer
May 9, 2005
2
IE
I want to specify the following property to Javac

-J-Dpp.charset="pp.charset.properties"

I tried to do it via a compilerarg in my build.xml as follows

<compilerarg value="-J-Dpp.charset=pp.charset.properties"/>

This results in the following error :

javac: invalid flag: -J-Dpp.charset=pp.charset.properties
[javac] Usage: javac <options> <source files>
[javac] where possible options include:


How can I include the " so that I get "pp.charset.properties"?

I tried the following syntax which is invalid ...

<compilerarg value="-J-Dpp.charset="pp.charset.properties""/>

Is there a way to tell ant to ignore characters?

Any ideas?







 
Hi

Since then I've found how to quote.

See the link


The correct syntax is
<compilerarg value="-J-Dpp.charset=&quot;pp.charset.properties&quot;"/>

However ant still has a problem with this command.

javac: invalid flag: -J-Dpp.charset="pp.charset.properties"
[javac] Usage: javac <options> <source files>
[javac] where possible options include:

....

Has anybody got a solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top