Netbeans not opening in ubuntu
Asked Answered
S

11

7

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

Stumpage answered 23/8, 2014 at 15:22 Comment(6)
Please specify something more,it won't be resolved with only this much of hint!Ledet
I mean i have the netbeans installed in /opt folder. But it's not openingStumpage
How it's not opening? Means the start-up screen just freezes OR some permission related error is being thrown OR some other reason is being displayed? Please clarify a bit more!!!Ledet
How did you install it? Try uninstalling it with --purge and then install it thru the repository with apt-get. I'm using Ubuntu 14 and NB 8 and it works for me.Delectate
I don't have idea about how it is installed since i don't have administartive privileges... so i cant do the sudor any other terminal commands.. am helplessStumpage
Please run from terminal and check the output.Halliard
T
8

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.

Trilateral answered 6/8, 2018 at 3:12 Comment(0)
O
4

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.

Osyth answered 1/2, 2018 at 13:20 Comment(2)
and how do i find, where is my default JDK installed?Cyprio
#5251823Osyth
I
2

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!

Indeed answered 11/2, 2019 at 17:46 Comment(3)
That is just one of the cases. What about latest all?Evangelist
Then you need to configure your path variables correctly.Indeed
It was a corrupted netbeans comfig in my caseEvangelist
A
2

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
Anastomose answered 19/10, 2019 at 20:16 Comment(0)
L
1

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.

Loveinamist answered 6/5, 2016 at 8:57 Comment(0)
G
0

this got it working for me:

sudo add-apt-repository ppa:vajdics/netbeans-installer
sudo apt update
sudo apt install netbeans-installer
Garnish answered 11/1, 2018 at 12:56 Comment(0)
G
0

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.

Galloping answered 1/10, 2018 at 8:17 Comment(0)
S
0

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.

Skutchan answered 3/2, 2019 at 15:0 Comment(0)
E
0

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

Evangelist answered 15/9, 2019 at 11:13 Comment(0)
N
0

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

Nels answered 6/12, 2023 at 19:25 Comment(0)
H
0

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.

Hamper answered 6/4 at 18:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.