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.
Created attachment 107776 [details] source for simple test of problem. On entry into the "main" function in C/C++ argc is always set to 1 and argv only contains the executable path (argv[0]), regardless of whether or not you have set command line arguments in the project "run" environment. See attached program. It does not work if args are set in "run" properties window.
Hm... looks really strange to me. Could you, please, create an 'Arguments' sample application and try if it works, please? What exact version of NB do you use (Help->About)?
The attached source code is a complete program. Just create a project containing only this file and sets its properties->run->arguments to "string1 string2 string3" or any other strings of your choice and run the program. Only arg[0] comes out. In debug mode "main(int argc, char *argv[])" shows argc to be 1 and argv has only one entry, the executable path. I expect the arguments from the "properties->run->arguments" field are not being passed to the debugger or shell on execution. Dave H.
More comments... I am using the NetBeans 6.9 obtained through the Ubuntu disto site. I am using the GNU toolset. Help->About returns: Product Version: NetBeans IDE 6.9 (Build 100825-unknown-revn) Java: 1.6.0_20; OpenJDK Client VM 19.0-b09 System: Linux version 2.6.35-28-generic running on i386; UTF-8; en_US (nb) Userdir: /home/dhawkins/.netbeans/6.9
Dave, I said that this is very strange, because this functionality is tested and used.. But, from the other hand, I see that you are using OpenJDK.. Perhaps this is the reason (?? Not sure though).. Also you are using an old version. Don't you want to try something newer? (download from netbeans.org). 7.0 is about to be released very soon. But you can try 7.0 RC2 right now... BTW, in this (7.0) version this place (how to setup arguments) was slightly changed...
This bug appears if you installed NetBeans 6.9 or 6.9.1 without patches.
Valera, what should we do with this? It is not reproducible in current versions. Should it be just closed?
*** This bug has been marked as a duplicate of bug 190919 ***