Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got the following error when installing netbeans on fedora 8

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.

I am getting this

alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.7.0-icedtea/bin/java
   2           /usr/lib/jvm/jre-1.5.0-gcj/bin/java

Enter to keep the current selection[+], or type selection number:
share|improve this question
    
Are You install JDK ? –  SjB Aug 25 '09 at 11:16
    
yes i installed jdk.. the error is happening when i am executing java programs with new constructor for Swing component. I think the problem may be due to the precence of gcj,which may reside over jdk –  cdb Aug 25 '09 at 11:50
add comment

1 Answer

up vote 2 down vote accepted

Verify that you are indeed using the JDK. You can do this by becoming root or using sudo to check the "alternatives" program. By default Fedora uses gcj. You can tell it to use the JDK by properly setting up your alternatives.

[root@localhost ~]# alternatives --config java

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
   2           /usr/java/jdk1.6.0/bin/java

Enter to keep the current selection[+], or type selection number: 2
[root@localhost ~]#

You may have to tell alternatives that another java version exists. The instructions are well defined in the alternatives man page. You'll need to do something similar for jar and javac. Make sure the path is proper for your JDK installation.

Updated 8/27/09 It seems that this is a well known issue with Java & Fedora 8.

Can't install Netbeans on Fedora 8

Here's the workaround from the netbeans mailing list...

Netbeans.org workaround

share|improve this answer
    
Yes Its working through Netbeans.org workaround. –  cdb Aug 28 '09 at 7:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.