This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Command line parameters do not respect double quotes in windows | ||
---|---|---|---|
Product: | projects | Reporter: | tusharvjoshi <tusharvjoshi> |
Component: | Ant | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
tusharvjoshi
2010-10-22 13:04:53 UTC
The value is just passed to Ant's java as arg line. Ant will try to split the command line in a way similar to what a (Unix) shell would do. I understand that the arguments are passed to the ant target as arg element. My point is the behavior shown by Windows Command Prompt and the NetBeans IDE shall be same on Windows. This may be a bug with the ANT component NetBeans IDE is using, but for the user the perception is what they are getting from command line is not available through NetBeans IDE GUI. It will also be worthwhile to think about any workaround, any escape sequence which can be passed through the NetBeans IDE GUI to achieve this somehow. This may be an issue with the ANT component, in that case still we will have to find out workaround for ANT issue, as NetBeans IDE internally uses ANT. with regards Tushar Joshi, Nagpur Handling metacharacters in Unix command-line parsing is difficult, and Windows behaves completely differently. The best we can do is pass <arg line="${something}"/> to Ant, which tries to parse this out as best it can, but in general passing metachars such as spaces will not work well when they have to be encoded and then decoded this way. Configuring a variable-length list of arguments as separate properties is not an option because (without using <script> or specialized tasks) it is not possible for an Ant script to pass execution args of a statically unknown length except by line="...". If your app really needs specialized CLI arguments, it is best to override the run target in build.xml and pass them in as <arg value="..."/>, which bypasses the escaping/unescaping system. (At least on Unix; I have no idea what Windows will do.) Safer is probably to have a config file in a format of your choice with detailed information, and just pass the location of this config file to the app. |