Parent page: Programming Applications
The NetBeans IDE is an open-source, fast and feature full tool for developing Java software. It is standards compliant and runs on any operating system where a Java Virtual Machine is available.
Installing the Latest Version Directly from Binaries
The version of NetBeans available from synaptic or apt-get is usually out-of-date from the version available directly from NetBeans. For example Ubuntu Jaunty 9.04 contains Netbeans 6.5 in repository while release 6.7 is pending. If you are required to run the latest release please proceed in reading the rest of this section. This section covers the installation of NetBeans 6.5 from binaries downloaded directly from the NetBeans website but it can most likely be applied to future release so it is left here for reference.
Quick and Easy way to install Netbeans
Install Netbeans 6.5 - This downloads directly from www.netbeans.org. It also configures Ubuntu rubygems to work inside Netbeans.
Download the Binaries
You can get the binaries at the NetBeans download page. Download the appropriate version depending on what language(s) you want to develop in. I chose Java. Download the file and save it to your home directory, /home/yourusername.
cd $HOME sudo sh ./netbeans-6.5-ml-java-linux.sh
Create a script to run netbeans (skip this if you want to invoke it from Applications -> Programming -> NetBeans IDE 6.5 in the Ubuntu menu bar):
cd $HOME mkdir bin cd bin # Create a file called netbeans in the current dir and make its contents exactly as # follows in the next two lines and then save it and then quit your editor: #!/bin/bash /usr/local/netbeans-6.5/bin/netbeans # Make it executable chmod u+x netbeans # Put this in your path for this shell session # (add this line to your .bashrc or .zshrc file in /home/yourusername # to see the path in all future shells; be sure to exit the shell to see the changes though) export PATH=/home/yourusername/bin:$PATH # Run NetBeans! netbeans
Alternatively, you can just add /usr/local/netbeans-6.5/bin to your PATH, or you can run the following if you don't even want to mess with your PATH:
ln -s /usr/local/netbeans-6.5/bin/netbeans /usr/local/bin/netbeans
If the installer fails or cannot find the Java JDK, try
which java which javac
If those both return values, perhaps the installer missed them and you can browse for them manually yourself in the installer. If one of those does not return a value, you need to install Java:
sudo apt-get install sun-java6-bin sun-java6-jdk
The Installer or NetBeans Window is All White or Blank: Problems with Compiz
Although I did not have any problems with NetBeans and Compiz in Ubuntu 8.10, if you are experincing problems you may try changing your netbeans shell file above to be:
This makes NetBeans run with the MToolKit windowing toolkit but leaves the rest of your desktop running in Compiz. This was claimed to work on Ubuntu 7.10.
NetBeans blank when maximised on Ubuntu Netbook Remix (9.04)
NetBeans appears blank when run maximised in Ubuntu Netbook Remix Ubuntu 9.04.
NetBeans displays correctly unmaximised (right click on the NetBeans window title bar and select unmaximise) at the cost of a little screen space. Selecting View > Full Screen in NetBeans (Alt-Shift-Enter) also displays NetBeans correctly.
NetBeans 6.8 displays correctly when maximised in Ubuntu Remix 9.10 using Java 1.6 from Sun. No problems were experienced with the installer.
NetBeans 4.1 on AMD64
For instructions on installing Netbeans 4.1 on AMD64, see Netbeans4.1onAMD64.
Installation of NetBeans from Ubuntu Packages
To install NetBeans you can run Synaptic Packet Manager and install the package named netbeans, or open a terminal and type
sudo apt-get install netbeans
Java SDK will will be automatically installed as dependency if it's not installed. If you want the latest version of NetBeans, you must install it manually.
If you install system-wide a Netbeans bundled with Sun's J2EE Application Server, you will not be able to use the default domain (domain1) from a non-privileged user account. The installed files are owned by the root account and some are read/write protected. An easy solution is to give all the files in the domain1 directory to your user.
sudo chown -R <your_user>:<your_user> <SUNWappserver_install_dir>/domains/domain1
In Netbeans, in the "Runtime" right-click to the "Server" item to "Add Server...". In the wizard, use your SUNWappserver directory as "Platform Location" and choose yhe default domain in the drop-down box. After clicking "Next", enter the default admin user (admin) and password (adminadmin) and click "Finish".
A more cleaner solution, is to make a copy of domain1 and then give files in this copy to your user. Because they contain path specific information, you will have to edit the following files: bin/starserv and bin/stopserv.
sudo cp -R <SUNWappserver_install_dir>/domains/domain1 <copy_destination> sudo chown -R <your_user>:<your_user> <copy_destination>/domain1 cd <copy_destination>/domain1 gedit bin/startserv bin/stopserv
in each file, search the line that looks like
and replace it with
In Netbeans, in the "Runtime" right-click to the "Server" item to "Add Server...". In the wizard, use your SUNWappserver directory as "Platform Location", choose "Register Local Domain" and click "Next". Use your copy of domain1 as "Domain Folder" and, after clicking "Next", enter the default admin user (admin) and password (adminadmin) and click "Finish".