If you’re a developer and might want to use NetBeans as your favourite IDE – here’s how to do it. This is not a detailed description on what might go wrong – but it’s a start. And it’s how I brought it to life myself.
## Downloading Netbeans ##
Go to the [NetBeans Download Section](http://www.netbeans.info/downloads/download.php?a=b&p=2). From the dropdown list choose *Linux*. Then choose *next*.
## Installing ##
You will have to have a Java SDK already installed to use (and at least install) Netbeans. [David Coldrick](http://blogs.sun.com/roller/page/coldrick) has a blog at [blogs.sun.com](http://blogs.sun.com/roller/main.do) where he discusses [the issue of installing Java under Ubuntu Linux](http://blogs.sun.com/roller/page/coldrick?entry=java_development_on_ubuntu_part).
Once you have Java up and running you can continue installing NetBeans. With a terminal go to the folder you’ve downloaded the NetBeans installation file to. Now export the *JAVA_HOME* variable to point to the Java home directory.
cd /path/to/downloaded/netbeans/installer/
export JAVA_HOME=/usr/lib/j2sdk1.5-sun/
You’ll get a strange error if *JAVA_HOME* isn’t set to the right directory (*The wizard cannot continue because of the following error: could not load wizard specified in /wizard.inf (104)*). But nothing happens – don’t be afraid honey, it’s only an error message.
The next you’ll have to do is make the binary file executable. Don’t worry if you don’t know how to do that – I’ll show you:
chmod +x nb-4_1-linux.bin
Change *nb-4_1-linux.bin* to the filename you just downloaded. Now you’re able to start the installer:
./nb-4_1-linux.bin
Once running it’s going to be easy to install NetBeans. Just follow the instructions given. The defaults are quite okay. The only thing I changed was the installation directory – I changed it to `/home/sandman/software/netbeans-4.1/`, it’s up to you.
## Using NetBeans ##
Once installed you can open the NetBeans IDE by executing the following commands:
export JAVA_HOME=/usr/lib/j2sdk1.5-sun/
/path/to/netbeans/bin/netbeans
If you don’t want to start NetBeans that way (and you *really* don’t want to start it that way all the time) then add the following lines at the end of your `~/.bashrc` file:
export JAVA_HOME=/usr/lib/j2sdk1.5-sun/
alias netbeans=’/path/to/netbeans/bin/netbeans’
Note: The ~/.bashrc file is included every time you start a terminal. This way the *JAVA_HOME* variable is always exported and an alias for *netbeans* is being set – now you only have to type *netbeans* to open up the IDE. No more hurt/broken fingers when starting netbeans!
## Further Reading ##
Congratulations if you made it this far! I know this is no complete guide with error recovery and support hotline. But if you think you got stuck or if you’d like to have more detailed answers I’ll give you some hyperlinks to got to.
* [David Coldrick on Java Development on Ubuntu](http://blogs.sun.com/roller/page/coldrick?entry=java_development_on_ubuntu_part1)
* [Ubuntu Wiki – Help on Java and NetBeans](http://ubuntuforums.org/showthread.php?t=119303)