2 minute read

Before you consider the option of running an IDE from a portable drive, be aware of the speed issue with USB drive as it is likely too slow to become an efficient solution in daily life. Just in case when you do need this option, the following gives the steps to do so.

Note: NetBeans requires an installation of JDK. If you do not have JDK in your computer or portable drive, refer to Installing Java JDK in Windows and MacOS

1. Download and extract

  • Open the link
  • Select Binaries: netbans-11.2-bin.zip in the platform dropdown list. The version number may vary.
  • Download the zip file to the drive.
  • Extract the zip on the drive.
  • The extraction should create the directory netbeans. Depending on how you extract the file, you may need to drag the directory netbeans to the root of your drive, from the generated folder after the extraction.

2. Launch the IDE from the portable drive on Windows

Option 1: Double click the executable with default settings

Assume that you will use an existing Java installation n the computer and the default user directory. Navigate to the netbeans directory in the portable drive. In the directory bin, double click netbeans64.exe or netbeans.exe for a 32-bit computer.

Option 2: Run the executable from the command line

  • Press windows button+R in your computer, type cmd in Run Program.

  • In the Command Prompt window, enter the following command to start the IDE with custom configuration on the user working directory or the jdk directory or both.

X:\netbeans\bin\netbeans64.exe --userdir C:\MyOtherUserdir --jdkhome "X:\java\jdk1.8.0_111"

Replace X with the drive letter name. C:\MyOtherUserdir should be replaced with a directory which stores your NetBeans work.

Option 3: Change the configuration

You also can write User directory and JDK directory into the configuration file, if the same options will be used most of the time.

  • In the home directory of NetBeans, locate /etc/netbeans.conf.

  • Open netbeans.conf in a text editor.

  • Locate the following lines:

  • Change ${DEFAULT_USERDIR_ROOT} to a directory in your portable drive. X should be your portable drive letter name.
  • If you also want to use the portable JDK in the drive, locate the line
* Remove the # sign to uncomment the line.
* Replace */path/to/jdk* with the JDK home directory, like *X:/jdk*, assuming X is the drive letter name.