Generic Launcher
The$nbplatform cluster is guaranteed to contain  $nbplatform/lib/nbexec executable that is supposed to be used by final products. Example:  The NetBeans IDE product should provide its own executable /usr/bin/netbeans which will locate the  $nbplatform/lib/nbexec  (currently implemented here for  unix and here for  windows) executable, read their own configuration files,  find out locations of additional clusters and pass  --clusters /pathto/nb4.0:/pathto/ide4:/pathto/enterprise7  and --userdir $HOME/.myproductuserdir to it.  
 The Native Product should have its own launcher called  netbeans-native and read its own settings, specify its own user directory and list of clusters (probably --clusters /pathto/ide6:/pathto/web9 as the Native product is extension of the base NetBeans IDE without the enterprise part) and  pass that information to the generic $nbplatform/lib/nbexec.      
Configuring the Launcher
The behaviour ofnbexec launcher can be influenced by special arguments and environment variables: - --clusters - specifies the paths to clusters that shall be      placed on the execution stack (config, modules, configurations, etc.).     Individual elements are separated using      java.io.File.pathSeparatorso for example on Windows it is; and on Unix: 
- --branding - gives the name of branding that shall be used     
- regular parameters - these are end user oriented parameters     printed when invoked with --help option:     Usage: bin/../platform4/lib/nbexec {options} arguments
 General options:
 --help show this help
 --jdkhomepath to Java(TM) 2 SDK, Standard Edition 
 -Jpass to JVM 
 --cp:pprepend to classpath 
 --cp:aappend to classpath 
 Core options:
 --lafuse given LookAndFeel class instead of the default 
 --fontsizeset the base font size of the user interface, in points 
 --localeuse specified locale 
 --userdiruse specified directory to store user settings 
Now we are assured that NetBeans can and is in deed launched from a jar(or a cluster of jars ^_^), and the .exe thing is just a configuration reader. Look into the nbexec file, and you will finally get the command like this:
java -Djdk.home=/usr/lib/jvm/java-6-sun -classpath $nbhome/platform6/lib/boot.jar:$nbhome/platform6/lib/org-openide-modules.jar:$nbhome/platform6/lib/org-openide-util.jar:$nbhome/platform6/lib/locale/boot_ja.jar:$nbhome/platform6/lib/locale/boot_pt_BR.jar:$nbhome/platform6/lib/locale/boot_zh_CN.jar:$nbhome/platform6/lib/locale/org-openide-modules_ja.jar:$nbhome/platform6/lib/locale/org-openide-modules_pt_BR.jar:$nbhome/platform6/lib/locale/org-openide-modules_zh_CN.jar:$nbhome/platform6/lib/locale/org-openide-util_ja.jar:$nbhome/platform6/lib/locale/org-openide-util_pt_BR.jar:$nbhome/platform6/lib/locale/org-openide-util_zh_CN.jar:$nbhome/platform6/lib/locale/swing-l10n_pt_BR.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar -Dnetbeans.dirs=$nbhome/nb5.5:$nbhome/ide7:$nbhome/enterprise3/ -Dnetbeans.home=$nbhome/platform6 org.netbeans.Main --userdir /home/yang/.netbeans/BTW, NetBeans can be shared between linux and M$win.
