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.

Bug 196562 - Some "VM Options" later misparsed as main class name
Summary: Some "VM Options" later misparsed as main class name
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: All All
: P4 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 21:49 UTC by wz2b
Modified: 2016-07-07 08:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen snapshot of borked up run menu created by adding an extra -cp to the vm options (43.79 KB, image/png)
2011-03-10 21:53 UTC, wz2b
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wz2b 2011-03-10 21:49:13 UTC
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>
Comment 1 wz2b 2011-03-10 21:53:29 UTC
Created attachment 106895 [details]
Screen snapshot of borked up run menu created by adding an extra -cp to the vm options
Comment 2 Jesse Glick 2011-03-14 20:05:28 UTC
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.
Comment 3 Milos Kleint 2012-05-17 11:35:57 UTC
-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?
Comment 4 Martin Balin 2016-07-07 08:37:30 UTC
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