Installing NetBeans on Ubuntu 16.04

Watch the video on how to install NetBeans to Ubuntu 12.04. Download the PDF for how to install NetBeans onto Ubuntu 12.04. This document will guide you through the process of installing the NetBeans IDE onto your Ubuntu 16.04 computer.  An IDE will greatly enhance your ability to write extensions for the Joomla 3.x framework.  An IDE gives you the ability to look at parent classes and explore the code and it's documentation.  Additionally, IDE's allow you to use version control systems like git, and auto build features.  These topics will be covered in future tutorials.  Let's get started!

Step 1 - Installing Java JDK

NetBeans 8.1 requires the Java SDK version 8 to run. There are a couple of ways that you can install this. The first is search on Java in the software center or synaptic package manager. But I think it is just as easy installing it from the command line. Press [CRTL][ALT][T] to open a terminal. When the terminal comes up, install the JDK by entering the following command: sudo apt install default-jdk

The default JDK for Ubuntu 16.04 is version 8.

Step 2 - Download the NetBeans IDE

Download the NetBeans IDE. Open your browser and go to https://NetBeans.org. On the NetBeans homepage, click the download button on the upper right section of the screen. The downloads screen shows several different versions of NetBeans you can download. You can select whatever will suit your needs but for this tutorial, we are only interested in the PHP version of NetBeans. This version has support for both HTML and PHP which is what we need to write Joomla extensions. You will see a download button at the bottom of the PHP column. Click the button and download the software.

Step 3 - Making the NetBeans file and executable

In order to run the installer program we just downloaded, open the terminal if it isn't already open and navigate to where you saved the file. If you have not changed Firefox's default settings, you will find it in the Download folder of your Home Folder. Open a terminal with [CTRL][ALT][T] and navigate to your Downloads folder by issuing the command cd ~/Downloads. Once you navigate to this folder, issue the command chmod +x netbeans-8.1-php-linux-x64.sh. Pay attention to the name of the file. You may have a newer version of the program than was available at the time of this tutorial. Perhaps use command completion with the tab key.

Step 4 - Installing the NetBeans Application

Now that we have marked the program as executable, we can run the installer with the following command: ./netbeans-8.1-php-linux-x64.sh. NetBeans will make a check to see if the Java JDK has been installed and then will start the install process. When the dialog comes up click the next button to start the installation process. Next you will be presented with the license agreement. Check the box and click the next button. Next, it asks for the directory to install the program to. Unless you have a need to specify different directory for this, leave it as default and click next. Lastly, decide if you want NetBeans to check for any available update and check or uncheck the box as desired. I choose to let it check for any updates. Finally, click the install button. When the program has finished installing you will be presented with a dialog asking if you want to contribute to the NetBeans project by providing anonymous usage data. Either check or uncheck the box as you see fit and click the finish button.

Step 5 - Running NetBeans

All that is left to do is run NetBeans. The installer places a link on your desktop to run the program. Double click this link and start NetBeans. NetBeans opens to a splash screen where you can start creating projects and coding. When running NetBeans for the first time it would be a good idea to go ahead and install any updates to the IDE that are available. To do this, click the HELP | Check for Updates menu item. NetBeans will display a list of updates that are available (if any). Click the Next button to begin the installation of the updates. NetBeans will ask you to agree to any needed license agreements at this time. Once you agree, click the Update button and the updates will start installing. Once the installation starts for any updates, it will be minimized to the status bar at the bottom of the screen. Once the updates are installed, you may need to restart the NetBeans IDE for some of them to take effect. One last suggestion I would make is while NetBeans is running, right click its icon on the unity bar and click the lock to launcher link.

ALL DONE!!!