rds rds - 5 months ago 7x
iOS Question

Quotes in command line arguments passed to Java main()

I run a Java program with the following command line (Edit: in NetBeans 6.8 project properties)

toto has:"tutu titi"

args is an array of 2 Strings

has:tutu titi

I want (two arguments indeed, the second)
to be

has:"tutu titi"

How should I do that?

Edit: I have already tried escaping the quotes with backslash from "Arguments" line in Netbeans propject properties, but I get args[1]

has:\tutu titi\


I had a similar problem in NetBeans and found the solution:

Edit/Add the property "application.args" in your private.properties to this:

application.args='has:""tutu titi""'

Single quotes to mark your "argument" and two double quotes to define one "double quotes".