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.
NB 6.0 RC 1, Solaris 10, Sun JVM. When starting *two instances* of NB 6.0 RC 1 from the commandline, the second instance gives window focus to first instance (and sometimes?) prints a "Running instance updated" message one the commandline. But it switches window focus *only* if the previous NB instance is running on the *same* workspace. Starting the second instance from a shell in another workspace results in getting a new prompt, no window focus change, and no message. When starting *two instances* of NB 6.0 RC 1 from a desktop launcher icon, the second instance *apparently* does nothing, as the printed text is (probably) piped to a log. There is no window focus change in this scenario either, even from the same workspace. It would be far better if the second instance gave a popup telling the user that NB is already running, and that focus will be passed to the running instance. This popup could originate from the first instance. Rationale behind filing this as a defect is that the user will repetively click the desktop icon, or attempt to start NB from the commandline, if he wanted two NB instances (for whatever reason). To the user it seems nothing is happening on the second start.
http://openide.netbeans.org/proposals/arch/cli.html
Referring to the proposal, this issue is a either a defect or a necessary enhancment to the implementation of Requirement 1, more specifically the method used to "warn" the user.
This needs to be handled by windowsystem, it has (nearly) nothing to do with CLI. If the main window already visible, then it should be fronted, unminimized, the current desktop shall either be switched to the one that contains the netbeans window or the netbeans window should be brought to current desktop. The code needs to be placed to core/src/org/netbeans/core/CLIOptions2.java and verified that it works on various OS and desktop environments. Btw. we are able to accept patches, so thomanie, feel free to experiment the the code in CLIOptions2, so your are satisified and then attach here a patch.
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team