32

I used NetBeans for Java development on Windows and remember finding it in the Ubuntu Software Center on Natty, but now it's gone. Is there a PPA I can use or will it be re-added to the official repos?

2

12 Answers 12

36

NetBeans' Integrated Development Environment (IDE) is available in Ubuntu's Universe/Java section. Following are the steps to install from the repository: Scroll down for steps to install the latest version of the IDE.

  1. If Universe repository in not allowed, allow it and update:

    sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
    sudo apt-get update
    
  2. Install NetBeans with:

    sudo apt-get install netbeans
    

Useful terminal shortcut: Ctrl+Shift+V can be used to paste copied text to terminal.

The NetBeans IDE - Shapshots:

The IDE's startpage: snap1

A sample project: snap2


Downloading and Installing the latest available version:

You can download the installation files and get help with installation, troubleshooting and others at NetBeans' official website. (The contents below have been adopted from the same.)

Downloading the software:

  1. Go to https://netbeans.org/downloads/
  2. In the upper right area of the page, select the language and platform (Linux (x86/x64)) from the drop-down list.
  3. Click the Download button for the download option that you want to install. download_sh

  4. Save the installer file to your system. save_installer

To install the software:

  1. After the download completes, run the installer script with .sh extension. You might need to make the installer files executable by using the following command: chmod +x <installer-file-name> (e.g. chmod +x netbeans-7.4-javaee-linux.sh)

  2. If you downloaded the All or Java EE bundle, you can customize your installation. Perform the following steps at the Welcome page of the installation wizard:

    • Click Customize;
    • In the Customize Installation dialog box, make your selections;
    • Click OK;
  3. At the Welcome page of the installation wizard, click Next.

  4. At the License agreement page, review the license agreement, click the acceptance check box, and click Next.

  5. At the JUnit License Agreement page, decide if you want to install JUnit and click the appropriate option, click Next.

  6. At the NetBeans IDE installation page, do the following:

    • Accept the default installation directory for the NetBeans IDE or specify another directory.

      Note: The installation directory must be empty and the user profile you are using to run the installer must have read/write permissions for this directory.

    • Accept the default JDK installation to use with the NetBeans IDE or select a different installation from the drop-down list. If the installation wizard did not find a compatible JDK installation to use with the NetBeans IDE, your JDK is not installed in the default location. In this case, specify the path to an installed JDK and click Next, or cancel the current installation. After installing the required JDK version you can restart the installation.

      Note: If the JDK version is older than the recommended JDK 7 Update 10, download and install the latest JDK update from Java SE Downloads page and restart the NetBeans IDE installer.

  7. If the GlassFish Server Open Source Edition 4.0 installation page opens, accept the default installation directory or specify another installation location.

  8. If you are installing Apache Tomcat, on its installation page, accept the default installation directory or specify another installation location. Click Next.

  9. At the Summary page, do the following:

    • Verify that the list of components to be installed is correct.
    • Select the Check for Updates check box if you want to check the Update Center for possible updates and have the JUnit library installed during the installation (provided you accepted the license in step 5.)
    • Verify that you have adequate space on your system for the installation.
  10. Click Install to begin the installation.

  11. At the Setup Complete page, provide anonymous usage data if desired, and click Finish.

    Note: If you encounter problems successfully completing the software installation, see Troubleshooting for descriptions and suggested workarounds for unresolved issues that could affect the installation process.


Uninstallation:

To uninstall the IDE:

  1. Shut down the IDE.
  2. In the IDE installation directory, run the uninstall.sh file.
  3. To uninstall GlassFish and Tomcat together with the IDE, at the Summary page make sure that the correct versions are listed and check the appropriate checkboxes.
  4. At the Summary page, click Uninstall.
  5. After uninstallation completes, click Finish.
2
25

Simply install it with the official installer.
(The example below uses the most recent Java SE version ...)

  1. Make the installer executable with chmod u+x netbeans-7.0.1-ml-javase-linux.sh
  2. Run the installer: ./netbeans-7.0.1-ml-javase-linux.sh
  3. Install it somewhere, like /home/username/Documents/NetBeans

This way, you can have an always-up-to-date Netbeans on your PC. Much more convenient than the official repository or a PPA.

ps.: This is not a direct answer to your question, but a different solution for the situation.

0
7
+50

NetBeans IDE 7.4 works better and faster with JDK distribution, so first download the oracle’s Co-bundled package JDK 7u51 with NetBeans 7.4. Go and download:

  1. Download:

    jdk-7u51-nb-7_4-linux-i586.sh for the 32-bit Linux System.

    jdk-7u51-nb-7_4-linux-x64.sh for the 64-bit Linux System.

  2. Open a terminal and change directory where file is (~/Downloads in my case)

    cd ~/Downloads
    
  3. Set execution privileges:

    chmod +x jdk-7u51-nb-7_4-linux-x64.sh
    
  4. Now run the installer using the command:

    ./jdk-7u51-nb-7_4-linux-x64.sh
    

It will bring up the install wizard and you can follow the on-screen prompts to install the software.

5

There was a third party PPA and now it is not supported / not working as expected

The best way is the official website:

  1. Download Netbeans from here
  2. Open a Terminal Window or use ctrl + alt + T
  3. Give Permission and Start Netbeans Installer

    cd </path/to>/netbeans*

    chmod +x netbeans-*-linux.sh

    ./netbeans-*-linux.sh

  4. Installation Process:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

2

NetBeans 7.0.1 was re-added years ago and can be installed as per usual:

sudo apt-get install netbeans 

Although it hasn't been updated since and feels very dated when compared to downloading and installing the current nightly or stable version. If it's a new installation of Ubuntu, the easier way to satisfy NetBeans' Java-dependencies would be getting the Java SE and NetBeans Cobundle.

Unfortunately, only the apt installation will keep everything updated but, I find myself following the Ubuntu release cycle enough that binary installations of NetBeans never feel old.

2

How to install netbeans

There are 3 ways how to install netbeans:

  1. Using the software center
  2. Downloading and installing manually
  3. Using a ppa

Using the software center

Netbeans is available in the software center. This will automatically get security updates. However, this is not always the most recent version.

Install via the software center

Downloading and installing it manually

The latest Netbeans is available on their website. Choose your version and click download. You will download a .sh installer.

To install:

Open the commandline (ctrl-alt-t) and go to the directory that contains the installer

cd Downloads

and start the installer

bash netbeans-*-linux.sh

Using a ppa (not recommended)

Why ppa's are risky

  1. Open another Terminal session.
  2. Copy-paste the command sudo apt-add-repository ppa:rockclimb/netbeans1 and press Enter, then Enter again when asked to.
  3. If prompted for your password, type it and then press Enter
  4. Copy-paste the command sudo apt-get update and press Enter.
  5. Copy-paste the command sudo apt-get upgrade and answer y if asked.
  6. NetBeans is now up-to-date. At this point it is now safe to close Terminal.

(Unfortunately, ppa:rockclimb/netbeans1 no longer works)

source: How to install netbeans using a ppa

1

It has been removed since the last version 6.9 failed to build in Oneiric, but you can still download it from the website where you find version 7.0.1 while in Natty there was version 6.9

1

To run, first you should give execute permissions for your user. To do that, run chmod u+x [file] with [file] being your startup script.

chmod u+x "NetBeans IDE 8.1-linux.sh"

To run Netbeans:

./"NetBeans IDE 8.1-linux.sh"
0

Here a script to automatic installation of NetBeans 8.2 (currently last available version). For newer version update the URL / or the version number:

# URL to installation script
URL=http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-linux.sh

# download script
wget -q ${URL} -O /tmp/netbeans-linux.sh

# install netbeans
sudo bash /tmp/netbeans-linux.sh --silent

# cleanup
rm /tmp/netbeans-linux.sh

# configure java jdk home (optional)
echo netbeans_jdkhome="/usr/lib/jvm/default-java" | sudo tee -a /usr/local/netbeans-8.2/etc/netbeans.conf
0

In case that someone reads this in 2018/19, here is how to install Netbeans 8.2 in Ubuntu 18.04. (Yes there's Netbeans 9.0 now, but it does not officially support PHP yet, so I'm going for 8.2.)

NB_INSTALLER=/tmp/netbeans-8.2-php-linux-x64.sh
NB_TEMP=/tmp/netbeans-install
wget --no-verbose -O $NB_INSTALLER https://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-php-linux-x64.sh
chmod +x $NB_INSTALLER

# Option 1: Unattended installation (for Vagrant etc.)
mkdir -p $NB_TEMP
sudo $NB_INSTALLER --tempdir $NB_TEMP --nospacecheck --silent

# Option 2: Setup wizard
sudo $NB_INSTALLER

/usr/local/netbeans-8.2/bin/netbeans &
-1

download netbean form official website the downloaded file in .sh format

that can be install by typing command sh filename.sh

url https://netbeans.org/downloads/start.html?platform=linux&lang=en&option=javase

-1

Download netbean

move file to Desktop then open Terminal (Ctrl+D+T)

get this command

cd Desktop
sudo chmod +x netbeans-*
sudo ./netbeans-*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .