2

I never used Ubuntu in my life before, and now I've installed Ubuntu 18.04 lts. I have problem with NetBeans. Although I have JDK and the rest that needs, I get this:

]

I can't open or start a project,nothing happens when I click. What should I do to fix this?

1
  • 1
    What's your java version?
    – Kulfy
    Jun 24, 2018 at 19:29

1 Answer 1

1

Installing Netbeans 9.0:

  • Building from Source:

    1. Download the source zip from here and extract. Or open terminal and clone the repositories from GitHub using

      git clone https://github.com/apache/incubator-netbeans
      
    2. Install either Oracle JDK or OpenJDK.

      • For Oracle JDK: Download JDK8 from here and run these commands:

        sudo su
        mkdir /opt/jdk
        tar -zxf jdk-8u181-linux-x64.tar.gz -C /opt/jdk
        update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_181/bin/java 100
        update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_181/bin/java 100
        
      • For OpenJDK, run

        sudo apt install openjdk-8-jdk
        sudo apt install openjdk-8-jre
        
    3. Install Apache ANT: For installing Apache Ant v1.10.3, run

      sudo apt install ant
      
    4. Once you’re all set just enter the incubator-netbeans directory and type ant to build the Apache NetBeans IDE.

    5. Once built, the IDE bits are placed in the ./nbbuild/netbeans directory. You can run the IDE from within the incubator-netbeans directory by typing ./nbbuild/netbeans/bin/netbeans or use ant tryme to run the Apache NetBeans IDE.

  • Installing from Binaries: Download the binary zip from here. Unpack the zip and run netbeans in bin folder using ./netbeans. I'll suggest to make a desktop entry a.k.a. menu shortcut. For details about it read this and this.

For natively installing Netbeans v8.2, See Karel's answer.

Original Answer:

Java seems to be quite broken currently under 18.04. This can create problems with Netbeans as well as Eclipse. So, I'll suggest not to install Java from Ubuntu's repository.

If you want JDK as well as Netbeans first of all remove Java completely from your system. Then download NB+JDK from here.

I assume that downloaded files go to Downloads and downloaded file name is jdk-8u111-nb-8_2-linux-x64.sh. Use below commands to install Netbeans and JDK 1.8.

  • Navigate to the folder(Downloads) containing file using

    cd ~/Downloads
    
  • Make file executable(if already not) using

    chmod +x jdk-8u111-nb-8_2-linux-x64.sh
    
  • Finally run it using

    ./jdk-8u111-nb-8_2-linux-x64.sh
    
  • Follow on screen instructions to complete installation.

3
  • The link NetBeans + JDK Bundle in your answer is obsolete, and it has been updated to this new link: netbeans.apache.org. A lot of stuff has changed. NetBeans has been updated to version 9.0 and it isn't bundled with JDK anymore. It's probably worthwhile updating this answer in order to get a source at Ask Ubuntu for information about how to install NetBeans 9.0. Alternatively I've already solved the problem of how to install NetBeans 8.2 natively in Ubuntu 18.04: askubuntu.com/questions/1045090/….
    – karel
    Sep 18, 2018 at 14:21
  • That's a good idea.
    – karel
    Sep 18, 2018 at 18:45
  • If you post, I'll comment if I see it, or you can PM me in Raiders of the Lost Downboat chatroom and I'll post an explanatory comment to slow down the undecided close voters.
    – karel
    Sep 18, 2018 at 19:06

You must log in to answer this question.

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