CommentsOnLaunchers

NetBeans launchers

NetBeans launchers are used as a wrappers allowing to start the IDE or other application built on top of platform easily. There are two launchers:

  • application launcher (netbeans / nb / app)
  • generic platform launcher that takes parameters from application specific one and actually starts the application (=nbexec=)

Unix

Windows

NetBeans application launcher

Processes options specified

  • on command line (highest priority)
  • in etc/netbeans.conf found in user directory
  • in etc/netbeans.conf of installation directory (lowest priority)

Similarly reads etc/netbeans.clusters to find valid list of clusters. Relative path (to what?) is supported. Not valid entries are removed.

Branding is specified

Solaris specifics

Solaris Tag is updated before IDE is started.

Windows specifics

There are two executable versions: with and without console showing outputs

If JDK is not specified or invalid JDK is specified the newest one searched from Windows registry is used.

The default location of userdir is not the best one (who dares to change it?).

Apisupport application launcher

This one is pretty much similar to NetBeans launcher.

It would be nice to allow updating of icon directly from apisupport in the future.

Platform launcher

Platform launcher exists in lib folder of platform clusters and starts the JVM. It processes some parameters before starting NetBeans

  • --help shows help and starts JVM so that it can show additional help messages
  • --jdkhome <path> (optional) path to Java(TM) 2 SDK, Standard Edition
  • -J<jvm_option> passed to JVM
  • --cp:p <classpath> or --cp:a prepend or append entries to classpath

AutoUpdate support

If JVM of running NetBeans application is exited and there are updates found this launcher runs updater.jar and then starts the IDE again.

Windows details

-Dsun.awt.keepWorkingSetOnMinimize is added as an option to improve performance when unmaximizing.

Two nbexec.exec are running. First one handles the loop for repeated execution of IDE and updater). The second one actually spawns JVM in a separate process. This has an advantage that we do not care about 32/64-bit architecture and disadvantage that starting through JNI would allow us to pass non-standard option and ask JVM to ignore them if they are not recognized.

How to build launchers on windows

  1. Download cygwin tools (setup.exe utility)
  2. Install parts necessary for build - make, gcc
  3. Run make in a directory where launcher sources and Makefile live. Default target only build executable(s), testinst and similar also copy it into your current development build under nbbuild/netbeans.

Once the environment is set up it is also possible to develop it using CND support in IDE (Project are now working with NB6.0M10). There are no debug/release configurations so if you need debug build just uncomment

#define DEBUG 1

line in sources and rebuild. A lot of debug messages will be printed to console.

In detail: http://wiki.netbeans.org/LauncherBuild

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