New Netbeans launcher for Windows



If user runs Netbeans on Windows 4 processes are created. Netbeans.exe/nb.exe, 2 instances of nbexec.exe and java.exe. This might be quite confusing for users. Moreover, if user terminates e.g. netbeans.exe IDE is still running - other processes are not terminated. If user runs also other java applications it is hard to distinguish which java.exe belongs to Netbeans. If more instances of Netbeans is involved situation is even worse. Other reason to "rewrite" launcher is to increase code quality - current version is poorly structured and is not very clean (unclosed handles, unfreed memory, ...).


In ideal case Netbeans should run in single process or at least there should be only one process other than "java.exe". The reason why there are two executables (netbeans.exe/nb.exe and nbexec.exe) is that nbexec.exe starts "platform" and netbeans.exe starts NB IDE "on this platform". Nbexec.exe is used also by "user" application developed on NB platform. The following steps should be done to solve this issue:

  • Move shared nbexec.exe functionality to DLL (rewrite will also eliminate 2 nbexec.exe instances for "autoupdate").
  • Try to make possible to run JVM inside single process - run time linking of jvm.dll. There should remain possibility to run JVM in separate process as well (e.g. via command line switch). The executables will be 32bit so in case user wants to run 64bit java there should be automatic "safe fall back" which will run JVM in separate process (32/64bit executables cannot be mixed within single process).
  • Create simple executable to just load nbexec.dll - to preserve the possibility to allow run platform itself.
  • Update netbeans.exe/nb.exe to use nbexec.dll instead of nbexec.exe.
  • Update app.exe (apisupport.harness) to use nbexec.dll instead of nbexec.exe.

Other issues that should be solved by rewrite

  • There were few issues where behavior of Windows launcher was not consistent with shell script launchers for linux/MAC.
  • There is not error reporting mechanism for non-console version of NB executable (netbeans.exe).
  • Code quality.
  • Other pending issues (131550, 131252).
  • Write Functional Spec
  • Write tests?
  • Write hints for QA for a new test spec?

QE notices

  • Please don't forget that Plugin Manager can force restart of IDE which should be considered during the launcher implementation.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo