cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

FaqPortableWorkingEnvironments

How can I set up the NetBeans working environment to be portable?
(e.g. on a USB drive)

If you use NetBeans in the office and at home, you might be considering to install NetBeans on an external portable USB drive so that you can take it with you.

The answer is similar to the question whether it's possible to run NetBeans from a network drive : Running an IDE from a USB drive is likely too slow to be usable in daily life.

If you do try it:

  • Make certain you have the same JDK installed (in the same paths) on the machines where you use the USB drive - or copy the JDK on the drive too. The same applies to web servers / version control systems / runtimes, whatever is applicable.
  • Download the OS-independent.zip distribution of NetBeans. Unpack it on your usb stick.
  • The directories you need to copy are the netbeans userdir (.netbeans directory), and of course your project directories.
  • Check whether you have a global netbeans.conf file: If yes, make certain it is identical to the one in your userdir to prevent unexpected behaviour in either environment.
  • In your netbeans installation directory, open /etc/netbeans.conf in a text editor.
  • Change netbeans_default_userdir="${HOME}/.netbeans/6.5rc2" to something like
     netbeans_default_userdir="X:/.netbeans/6.5" 
    assuming X is your USB sticks drive name.
  • Change the path to the JDK from #netbeans_jdkhome="/path/to/jdk" to e.g.
     netbeans_jdkhome="X:/jdk"
    Make sure to remove the hashsign (comment).


If it's running too slow:

  • Make certain that as much as possible is on the local harddrive. Start with the JDK and the userdir.

Conclusion:

It's probably easier and more efficient to install the IDE on both sides, and then to use a version control system to sync the configurations.


See also: http://eppleton.sharedhost.de/blog/?p=363