Ram Kumar
Ram Kumar

Reputation: 111

Netbeans not opening in ubuntu

I have installed NetBeans 8 in /opt folder due to permission reasons. I created a symlink and worked in my local from the morning. Suddenly, now it's not opening. IT does not seem to be crashed but I don't know why.

Any suggestions please

Upvotes: 8

Views: 30701

Answers (11)

CodeToLife
CodeToLife

Reputation: 4151

Aprel 2024

I uninstalled all, netbeans and java and then went through steps suggested in a video followed by the link :

enter image description here

right from installing openjdk and it worked.

Upvotes: 0

anre
anre

Reputation: 3755

If you copied over your installation from another computer, try to remove <NetBeans-8.2 installation directory>/nb/var/cache directory.

Upvotes: 0

Rupjyoti
Rupjyoti

Reputation: 21

Download netbeans with jdk for linux and after the download run these commands for install:

/Downloads# chmod +x jdk-8u111-nb-8_2-linux-x64.sh
/Downloads# ./jdk-8u111-nb-8_2-linux-x64.sh

Upvotes: 2

Predrag Manojlovic
Predrag Manojlovic

Reputation: 378

I've resolved the issue by deleting all NetBeans related config files in home directory. I hope that helps.

Upvotes: 0

Amit Gurbani
Amit Gurbani

Reputation: 607

Check the path for netbeans_jdkhome in netbeans.conf. You can find this file at usr/local/netbeans 8.2/etc/netbeans.conf`.

In netbeans.conf see this

netbeans_jdkhome="path_to_java"

for example: netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-amd64" or netbeans_jdkhome="/usr/lib/jvm/java-8-oracle" If path_to_java is incorrect, replace it with your actual java path. check your actual path by using $JAVA_HOME and copy it. Note this path is without /bin directory, so don't include /bin at the end of the path.

Upvotes: 4

Priyanshu Tiwari
Priyanshu Tiwari

Reputation: 311

This is happening because you have installed an older version of netbeans and your JDK is latest. Make sure that you install a latest version of netbeans which is supported by your JDK.

Happy Coding!

Upvotes: 2

TenG
TenG

Reputation: 4004

I had this problem too after upgrading to Ubunutu 18.04 from 16.04.

This worked for me.

Install Oracle 8 JDK

Got the instructions from here:

http://ubuntuhandbook.org/index.php/2018/05/install-oracle-java-jdk-8-10-ubuntu-18-04/

add-apt-repository ppa:webupd8team/java
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default

Configure Netbeans

Edit the netbeans.conf files to point to the Oracle 8 Java.

find / -name netbeans.conf -print 2>/dev/null

In my case this returned:

/usr/share/netbeans/8.1/etc/netbeans.conf 
/usr/local/netbeans-8.2/etc/netbeans.conf 
/etc/netbeans.conf 

For each netbeans.conf returned edit the file to set the netbeans_jdkhome to the Oracle Java.

netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"

Re-Install Netbeans

This still didn't work .. both 8.1. and 8.2 netbeans would crash out on the splash screen whun it got to "Loading modules".

So, I then re-installed Netbeans from the downloaded installer:

wget -c http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-linux.sh
bash ./netbeans-8.2-linux.sh

Then, running the 8.2 netbeans /usr/local/netbeans-8.2/bin/netbeans worked fine.

Upvotes: 0

Mukesh Singh Rathaur
Mukesh Singh Rathaur

Reputation: 13105

Same problem with me as well after upgrading to Ubuntu 18.04. Netbeans stopped working. I tried many ways changing the configuration.

The primary reason for this problem is java dependency.

Netbeans is directly dependent on Oracle Java and has tight coupling. Ubuntu 18.04 comes with default open jdk11 installed and set as default java.

When Netbeans starts it checks for the dependencies and fails due OpenJDK. Though in few cases it opens but not every features working. Sometime only few windows only opens in the IDE. Specially project explorer doesn't work.

To see the errors you can check the log file from the menu->view->IDELog

System Info: Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9) Operating System = Linux version 4.15.0-34-generic running on amd64 Java; VM; Vendor = 1.8.0_181; Java HotSpot(TM) 64-Bit Server VM 25.181-b13; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.8.0_181-b13 Java Home = /usr/lib/jvm/java-8-oracle/jre System Locale; Encoding = en_IN (nb); UTF-8 Home Directory = /home/mukesh Current Directory = /home/mukesh User Directory = /home/mukesh/.netbeans/8.2 Cache Directory = /home/mukesh/.cache/netbeans/8.2 Installation = /home/mukesh/netbeans-8.2/...

------------------------------------------------------------------------------`

Finally what worked for me is.

Finally what worked for me is setting the java_home path in the installed directory of Netbeans. Netbeans 8.2 is installed in HOME directory in general. Sometime it can be different. You can find out using locate command. change path for java_home inside

/home/<Netbean DIR>/etc/netbeans.conf netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"

Restart the Netbeans and it will work all well.

NOTE: Changing the above in system /etc/netbeans.conf directory will not work.

Upvotes: 0

mm_
mm_

Reputation: 1735

First:

sudo apt autoremove netbeans

Download netbeans 8.2 from: https://netbeans.org/

after you download the file, go to the directory and:

sudo apt-get install default-jdk
cd Downloads

or wherever the script netbeans-8.2-linux.sh is. Then

sudo chmod +x netbeans-8.2-linux.sh
./netbeans-8.2-linux.sh

Follow the instructions. If the field for JDK is empty, reinstall it, and then run the script again. You can remove JDK 8 too. This is not necessary, up to you.

Upvotes: 9

Shashank Saxena
Shashank Saxena

Reputation: 2028

this got it working for me:

sudo add-apt-repository ppa:vajdics/netbeans-installer
sudo apt update
sudo apt install netbeans-installer

Upvotes: 0

Tendai
Tendai

Reputation: 147

sudo apt-get install --reinstall netbeans will solve your issue. you must be running a situation where netbeans is older than your jdk or have some modules that are failing to start or have missing licences. start the ide from console [type netbeans], possibly there are modules which are failing and you may be presented with an option to close those modules and continue. After that you can then update your modules or best disable those you do not use.

Upvotes: 1

Related Questions