The things that you should never do with NetBeans IDE Installer

This document is provided as is with no warranty and no guaranty.
Everything written below is just for demonstration of the power and weakness of NBI - the installer engine which NetBeans IDE installer is based on.

There are a lot of things that you could do with NetBeans IDE Installer but you`ve never surmised.


Bundle tricks

I have downloaded installer for windows. Can I convert it for Linux?

Yes, you can. Do the following:

netbeans-6.1-javase-windows.exe --userdir tmp --create-bundle bundle.jar --platform linux
click next->create->finish
rm -rf tmp

Which bundles does it work for without problems?

  • cpp
  • javase
  • ruby

What about javaee,all,mobility?

You can use it for javaee if you want to get rid of GlassFish. You can`t use it for mobility or for all.

I have an Web&JavaEE bundle. Can I create the same without GlassFish/Tomcat?

Sure! Run installer as written below and uncheck GlassFish/Tomcat in the UI.

netbeans-6.1-javaee-windows.exe --userdir tmp --create-bundle bundle.jar
click next->create->finish
mv bundle.exe netbeans-6.1-javaee-noservers-windows.exe
rm -rf tmp

If you disable both servers then you give just the good old NetBeans IDE.

I have an All bundle. Can I create the bundle just with Base/JavaSE/Cpp/Ruby/UML?

Sure! Run installer as written above, click Customize button and uncheck the features you don`t won`t to have.

I have an All bundle. Can I create the bundle identical to Mobility bundle?

That`s not obvious but possible. Run installer as written below and select only BaseIDE/JavaSE/Mobility in the customize dialog.

echo "" > bundle.props
netbeans-6.1-javaee-windows.exe --userdir tmp --create-bundle bundle.jar --bundle-properties bundle.props
click next->create->finish
mv bundle.exe netbeans-6.1-javame-windows.exe
rm -rf tmp bundle.props

Can I bundle JRE to the installer?

  • First create bundled JVM file according to the instructions
  • Run installer in create-bundle mode with adding -J-Dnbi.bundled.jvm.file=<path-to-jvm.exe> parameter.

Silent tricks

Can I install NetBeans IDE silently?

Sure! Run installer as written below:

netbeans-6.1-windows.exe --record state.xml

and make the installation on this system. After installation (and uninstallation - since you can install the same NetBeans twice) run

netbeans-6.1-windows.exe --silent --state state.xml

That`s awful! Any other means?

As usual. Just run the following, cross fingers and be patient while the installation is completed

netbeans-6.1-windows.exe --silent

Simple silent installation with customization

There is a joint solution to perform simple silent installation and, from the other side, use some some customization.
There is a number of system properties (passing via -J-D<property>=<value> to the launcher) that affect installation process:

Property name Meaning Example Comments
NetBeans installation location netbeans-6.1-windows.exe --silent "-J-Dnb-base.installation.location=C:\Program Files\NetBeans 6.1"
GlassFish installation location netbeans-6.1-windows.exe --silent -J-Dglassfish.installation.location=C:\Sun\glassfish
GlassFish V3 installation location netbeans-6.5-windows.exe --silent -J-Dglassfish-mod.installation.location=C:\Sun\glassfish-v3
Tomcat installation location netbeans-6.1-javaee-windows.exe --silent -J-Dtomcat.installation.location=C:\Apache\tomcat
AppServer installation location java-tools-bundle-update5-windows.exe --silent -J-Dsjsas.installation.location=C:\Sun\AppServer Valid for Java Tools Bundle
JDK installation location jdk6-u6-nb6_1-windows.exe --silent -J-Djdk.installation.location=C:\Java\jdk1.6.0_06 Valid for NetBeans/JDK6 bundles and NetBeans/JDK5 bundles
MySQL installation location netbeans-6.1-mysql-windows.exe --silent -J-Dmysql.installation.location="C:\Program Files\MySQL\MySQL 5.0 Server" Valid for MySQL Bundle
JDK to be used by NetBeans that is installing netbeans-6.1-windows.exe --silent "-J-Dnb-base.jdk.location=C:\Program Files\Java\jdk1.6.0_04"
JDK to be used by GlassFish that is installing netbeans-6.1-windows.exe --silent "-J-Dglassfish.jdk.location=C:\Program Files\Java\jdk1.6.0_04"
JDK to be used by AppServer that is installing java-tools-bundle-update5-windows.exe --silent "-J-Dsjsas.jdk.location=C:\Program Files\Java\jdk1.6.0_04" Valid for Java Tools Bundle

What happens if I have everything from this bundle already installed?

Installer just exit with zero (0) error code.

Does that work with uninstaller?

Yes. Pass
flag to uninstaller of NetBeans/GlassFish/Tomcat and the appropriate product will be uninstalled guickly with no GUI.

Service Tags

Enable Service Tags in development builds

Currently service tags creation and registration functionality is disabled in development builds of NetBeans IDE installer. To enable and test it just run:

netbeans-trunk-nigtly-<buildnumber>-windows.exe -J-Dservicetag.allow.create=true -J-Dservicetag.allow.register=true

Disable Service Tags in FCS builds

Currently service tags creation and registration functionality is enabled by default in FCS builds of NetBeans IDE installer.
To create ST and to disable registraton (can be useful in silent installation) run the following:

netbeans-6.1-windows.exe -J-Dservicetag.allow.create=true -J-Dservicetag.allow.register=false

To disable the creation of ST and registraton run the following:

netbeans-6.1-windows.exe -J-Dservicetag.allow.create=false -J-Dservicetag.allow.register=false

Help Installer being not so stupid

Installer is thinking too much and warns about unsufficient disk space/file system roots/mount table and so forth. What to do?

Make sure that you have enough space in your temporary directory, that is defined by
/{TMP} enviroment variable (or /tmp on Unix, %USERPROFILE%/Local Settings/Temp on Windows), to extract the data that is stored in the installer file (size required is almost the same as the installer file size), and some more space is available at $HOME(%USERPROFILE%), then run
netbeans-6.1-windows.exe --nospacecheck

If you don`t have enough space in your temp or home directory try to override them using the e.g. the following command:

netbeans-6.1-windows.exe --tempdir C:\Temp --userdir C:\NBI

I want to have multiple instance of the same bundle installed. What should I do?

Run installer several times with specifying different installation workdirs (replace %USERPROFILE% by $HOME for Unix):

netbeans-6.1-windows.exe --userdir "%USERPROFILE%/.nbi" (that is the default)
netbeans-6.1-windows.exe --userdir "%USERPROFILE%/.nbi2"
netbeans-6.1-windows.exe --userdir "%USERPROFILE%/.nbi3"

See also: NBI Command Line Options

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