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.
Product Version = NetBeans IDE 7.0 Beta 2 (Build 201102140001) Operating System = Linux version 2.6.35-27-generic-pae running on i386 Java; VM; Vendor = 1.6.0_21 Runtime = Java HotSpot(TM) Client VM 17.0-b16 If you attempt to add another classpath to the "VM Options," when you go back into the Run properties the main class name is overwritten. Here is an example of an nbactions.xml fragment that shows the problem. I am attempting to add "-classpath local" to the exec options, and the dialog box is totally confused: <action> <actionName>run</actionName> <goals> <goal>process-classes</goal> <goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal> </goals> <properties> <exec.classpathScope>runtime</exec.classpathScope> <exec.workingdir>/home/cepasp/work/libansw/vehicle/project/trunk/</exec.workingdir> <exec.args>-Dahm.variant="Liban_Volvo Simulation" -Dahm.version=Development -cp local -classpath %classpath my.mainClassName /xml/param1 /xml/param2 param3</exec.args> <exec.executable>java</exec.executable> </properties> </action>
Created attachment 106895 [details] Screen snapshot of borked up run menu created by adding an extra -cp to the vm options
Such customizations exceed the capacity of the GUI to meaningfully edit them; edit nbactions.xml directly instead. But you should be told this when trying to save the customizations to begin with, i.e. VM Options should show an error if you try to enter arguments which could not be reliably reparsed later.
-classpath %classpath or parts of it are used to split the parameter into Options, Main Class and VM Options. what's before it is VM options, what comes after it is main class and then options. What does the -cp local switch do? you have a directory local somewhere?
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss