Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-213

Quoted string parsing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.2
    • 1.3
    • Parser
    • None
    • Kubuntu, JRE 1.6

    Description

      When you pass a quoted string as argument in command line (eg. java Hello -e "fname=\"vishal\" and lname=\"dhawani\""), it gives you one character less in result (eg. cmdLine.getOptionValue("e") will return you fname="vishal" and lname="dhawani).

      Actually when you see the args[] passed to java, args[1] is fname="vishal" and lname="dhawani" .

      The above thing works when we give extra space, ie. java Hello -e "fname=\"vishal\" and lname=\"dhawani\" ".

      Please check.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vishal.dhawani Vishal Dhawani
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: