Ask Your Question

Netbeans 8 won't install on Fedora 21 [closed]

asked 2014-12-10 00:05:59 -0500

szpraai gravatar image

updated 2014-12-10 15:19:53 -0500

mether gravatar image


I have just installed Fedora 21 and wanted to install Netbeans as well. When I run the install script I get the following output:

./ Configuring the installer... Searching for JVM on the system... Extracting installation data... Running the installer wizard... Can`t initialize UI Running in headless mode

Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler in thread "main"

I tried switching to classic Gnome or Gnome on Wayland too but without success. Since it worked with the past 6 Fedora versions I used, I am wondering what could be the cause.

Any help is appreciated!



edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sideburns
close date 2016-05-16 16:19:22.022416

7 Answers

Sort by » oldest newest most voted

answered 2014-12-11 04:52:31 -0500

jallen0927 gravatar image

I encounter this issue as well and fixed it just now. It seems to be the pre-installed openjdk issue. After I replace it with Java jdk, the issue got fixed.

  1. Find openjdk package sudo rpm -qa | grep openjdk
  2. Remove them by the command "sudo rpm -e $package", (replace $package to openjdk packages found in step 1).
  3. Go to Orcale website to download Java 8u25 JDK and install it.
  4. Then install NetBeans should be fine.
edit flag offensive delete link more


I have tried your solution, but it says LibreOffice is depending on that package, so I cannot remove it. With telling the Netbeans installer the --javahome path, it works fine without removing anything.

szpraai gravatar imageszpraai ( 2014-12-12 06:37:17 -0500 )edit

Yes, we don't need to uninstall openjdk actually, just install SUN/ORACLE Java JDK and alternative config it to the current java version, that's fine

jallen0927 gravatar imagejallen0927 ( 2014-12-13 20:08:03 -0500 )edit

i am getting the same..openjdk needed bye libreo and smthng other what should i do to install netbeans plz help

poojaaher95 gravatar imagepoojaaher95 ( 2015-08-30 09:09:31 -0500 )edit

answered 2014-12-25 07:30:05 -0500

Mounir gravatar image

Try to install java-1.8.0-openjdk-devel and it can solve your problem.

sudo yum install -y java-1.8.0-openjdk-devel
edit flag offensive delete link more


It`s help me ! , all works good

gyok gravatar imagegyok ( 2015-01-18 07:10:45 -0500 )edit

works!!! thx

jach gravatar imagejach ( 2015-02-07 11:58:25 -0500 )edit

I was needing this for minecraft it works thx.

KingLinux01 gravatar imageKingLinux01 ( 2015-06-13 19:11:39 -0500 )edit

it worked, thanks

psiuzin gravatar imagepsiuzin ( 2015-10-04 22:35:32 -0500 )edit

It worked. I only had the headless openjdk though, so the error was that I didn't have openjdk installed.

WolfangAukang gravatar imageWolfangAukang ( 2015-12-25 17:57:58 -0500 )edit

answered 2014-12-11 02:52:16 -0500

szpraai gravatar image

I have found a workaround in Netbeans forums. The solution is to explicitely tell the installer script where the JDK is. In my case:

./ --javahome /usr/java/jdk1.8.0_25/

It somehow cannot reach the system variables(?). I would be curious why, because I installed Fedora + Netbeans for like a hundred times before with success and the same way I wanted to now.

edit flag offensive delete link more


it works by specifiying your jdk version, thnx

MahdiRD gravatar imageMahdiRD ( 2014-12-21 18:55:03 -0500 )edit

Thanks bro by explicitely specifing JDK, it also works for me.

SilverHawk gravatar imageSilverHawk ( 2015-01-15 13:36:27 -0500 )edit

answered 2015-10-26 07:27:02 -0500

sudo dnf install java

edit flag offensive delete link more

answered 2015-07-15 18:40:51 -0500

Phuti gravatar image

Thanks this worked.

edit flag offensive delete link more

answered 2016-05-16 14:25:43 -0500

dextre gravatar image

gracias Mounir estoy usando fedora 23 de 64bits con gnome. saludos desde Lima Perú

edit flag offensive delete link more


This question has nothing to do with either Fedora 23 or Gnome, and isn't in Spanish. Please post an actual question in the appropriate language instead of hijacking a 17 month old thread.

sideburns gravatar imagesideburns ( 2016-05-16 16:18:50 -0500 )edit

answered 2014-12-10 03:27:21 -0500

cobra gravatar image

This could be an issue with Wayland. It's trying to use the current display, but the $DISPLAY variable is not set. If $DISPLAY is set, then it could be that your display is rejecting the connection from the application.

Take a look here: for information about setting the DISPLAY variable to see if that fixes it.

edit flag offensive delete link more


Thank you for the suggestion, I'll try it today.

szpraai gravatar imageszpraai ( 2014-12-10 03:36:27 -0500 )edit

You might also want to take a look at this: .

It seems that F21 has a 'server' subset of Java that can be installed without needing the display. It might be that you only need this lighter package rather than the full Java install to allow NetBeans installation to complete.

cobra gravatar imagecobra ( 2014-12-10 10:48:12 -0500 )edit

Question Tools


Asked: 2014-12-10 00:05:59 -0500

Seen: 21,806 times

Last updated: May 16 '16