NetBeans doesn't work
Installing Netbeans 9.0:
-
Building from Source:
-
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
-
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
-
-
Install Apache ANT: For installing Apache Ant v1.10.3, run
sudo apt install ant
Once you’re all set just enter the incubator-netbeans directory and type
ant
to build the Apache NetBeans IDE.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 useant 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 adesktop 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.
Related videos on Youtube
Comments
-
Simon over 1 year
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?
-
Kulfy almost 6 yearsWhat's your java version?
-
-
karel over 5 yearsThe 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 over 5 yearsThat's a good idea.
-
karel over 5 yearsIf 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.