WinNB67Launcher

Netbeans 6.7 launcher for Windows

Contents


Changes

Netbeans runs in single process by default

  • Instead of 4 process (netbeans.exe->nbexec.exe->nbexec.exe->java.exe) only single process (netbeans.exe) is created by default
  • Platform launcher (nbexec) is build as dynamic library (nbexec.dll)
  • nbexec.exe is still present to allow running platform manually (loads nbexec.dll)
  • Netbeans IDE launcher (netbeans.exe) is run-time linked to nbexec.dll which exports single function (int startPlatform(int argc, char *argv[[ | ]]))
  • Platform launcher (nbexec.dll/exe) executes by default JVM within the same process via JNI
  • All binaries are 32bit, if 64bit java is used, there is automatic fallback which executes 64bit java in separate process
  • Running JVM in separate process can be forced via new command line option --sproc
  • In the same way as netbeans.exe works platform application launcher (app.exe)

Console/non-console launchers were unified

  • nb.exe was removed and its functionality was moved to netbeans.exe, the same is true for app/app_w.exe
  • "Console version" (nb.exe, app_w.exe) of launchers were present to allow printing help (command line options) + java output while non-console version were present to start NB via shortcut without opening console
  • Now several options are present in single executable (netbeans.exe/app.exe)
  • Default behaviour - parent process console is attached. This means if netbeans.exe is started from console it is "reused" for output, if netbeans.exe is started by shortcut no console is created
  • If option "--console new" is specified netbeans.exe creates new console for output. This is useful if you want to start NB by shortcut and you want still see console output or if you need to start several NB instances with different user dirs. Console window will have correct icon and corresponding title e.g. netbeans --userdir d:\test_userdir --console new) so it is easy to distinguish which console belongs to certain NB instance
  • If option "--console suppress" is specified no output will be written to console you invoke it from

Complete rewrite

  • Besides mentioned improvements there were other reasons for rewrite:
  • Code was duplicated in several places (e.g. code for NB IDE launcher (netbeans.cpp) and Platform app. (app.cpp) was almost the same, just duplicated, the same was true for various helper functions). This resulted in situations when fixes were integrated only to one place and other remain unfixed.
  • Code was poorly structured (single file, a lot of global variables),
  • Code was not very clean (unclosed handles, unfreed memory, ...).
  • No logging was present - just some debug messages in "debug" build which is not shipped, so it was rather hard to obtain some information from users for trouble shooting.
  • Other benefits of rewrite
  • Now code is shared (e.g. utility functions shared by all launchers are in platform launcher o.n.bootstrap\launcher\windows\utilsfuncs.h/cpp, Platform app. launcher shares most of the code with NB IDE launcher)
  • Detailed logging was added, it can be enabled via command line option "--trace path_to_file" (e.g. netbeans.exe --trace d:\launcher.log"). If you want to have output in console instead of file you can specify "CON" as file name.

New command line options

  • "public" command line options (for netbeans.exe/app.exe/nbexec.exe):
  • --javaprocess (run java in separate process)
  • --trace <path> (path for launcher log (for trouble shooting))
  • "hidden" command line options (for netbeans.exe/app.exe):
  • --console new (force creation of new console)
  • --console suppress (suppress output to current console)
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