This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 210664 - Can't install Netbeans on Ubuntu 12.04 (and probably 11.10, too)
Summary: Can't install Netbeans on Ubuntu 12.04 (and probably 11.10, too)
Status: RESOLVED INVALID
Alias: None
Product: installer
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 225360 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-04 06:48 UTC by m_gol
Modified: 2013-12-01 06:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Netbeans installation log (33.11 KB, text/x-log)
2012-04-04 07:11 UTC, m_gol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_gol 2012-04-04 06:48:12 UTC
An installation attempt on Ubuntu 12.04 (and, as I've heard, in 11.10) ends abruptly:

$ sudo ./netbeans-7.1.1-ml-linux.sh 
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
Can`t initialize UI
Running in headless mode

Running it as a regular user changes nothing.

I've heard it works with Sun's JDK and not with OpenJDK. The two problems if that's true are:
1) Sun's JDK is no longer available in Ubuntu.
2) OpenJDK 7 is the reference implementation for Java 7 so Netbeans should work with it.

It's critical as now I can't install and use Netbeans at all...
Comment 1 Jiri Rechtacek 2012-04-04 07:07:17 UTC
As a workaround you can install JDK 7 from http://www.oracle.com/technetwork/java/javase/downloads/index.html => decreased to P2
Comment 2 Jiri Rechtacek 2012-04-04 07:09:12 UTC
(In reply to comment #0)
> An installation attempt on Ubuntu 12.04 (and, as I've heard, in 11.10) ends
> abruptly:
> 
> $ sudo ./netbeans-7.1.1-ml-linux.sh 
> Configuring the installer...
> Searching for JVM on the system...
> Extracting installation data...
> Running the installer wizard...
> Can`t initialize UI
> Running in headless mode
> 
> Running it as a regular user changes nothing.
> 
> I've heard it works with Sun's JDK and not with OpenJDK. The two problems if
> that's true are:
> 1) Sun's JDK is no longer available in Ubuntu.
> 2) OpenJDK 7 is the reference implementation for Java 7 so Netbeans should work
> with it.
Please, run the installer with --verbose --output /tmp/nb.log switches and attach it here. Thanks

> It's critical as now I can't install and use Netbeans at all...
Comment 3 m_gol 2012-04-04 07:11:13 UTC
Created attachment 117782 [details]
Netbeans installation log

Netbeans installation log added.
Comment 4 Jiri Rechtacek 2012-04-04 07:25:56 UTC
(In reply to comment #3)
> Created attachment 117782 [details]
> Netbeans installation log
> 
> Netbeans installation log added.

Thanks.
Comment 5 m_gol 2012-04-05 09:59:40 UTC
Just for others that potentially could experience this problem I think some specific instructions might be useful (following these steps has an advantage of not messing your Ubuntu's JDK, it will only affect Netbeans):

1) Download JDK from:
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html

2) Unpack it to your home directory (you'll get a jdk1.7.0_03 directory)

3) Start the installer from the command line with:
$ sudo su
# JAVA_HOME="$HOME/jdk1.7.0_03/" ./netbeans-7.1.1-ml-linux.sh

4) After installation create a script with the following contents (and name it netbeans):
#!/bin/sh
JAVA_HOME="$HOME/jdk1.7.0_03/" /usr/local/netbeans-7.1.1/bin/netbeans &>/dev/null &

5) Copy a created script to /usr/local/bin

6) Now you can start netbeans by pressing Alt+F2, writing netbeans and pressing Enter
Comment 6 Libor Fischmeistr 2012-04-12 08:46:36 UTC
Hi,

I tried to reproduce this bug but was unsuccessful. I used Ubuntu 12.04 Beta2, OpenJDK 6 (version: 1.6.0_24 build: 20.0-b12 - the same as you have due to log) and NB 7.1.1 ML ALL bundle. Whole installation passed perfect.

In log we can see that the problem was with look and feel init. May be there can be problem with Ubuntu (if you had Beta1) or with OpenJDK installation or somewhere else, but I don't think there is a problem with NB installation.

Only I can recommend you is to use your workaround, to try to update Ubuntu or to try OpenJDK 7.

Thank you for your interest in NB but I have to change the status of this bug as WORKSFORME.

PS: I also tried OpenJDK 6 both and OpenJDK 7 on Ubuntu 11.10 and both worked fine.
Comment 7 m_gol 2012-04-14 02:59:34 UTC
It turns out just installing OpenJDK 7 didn't help as the default one was still version 6. I removed all Java 6 related packages and now it works, indeed.

It's strange we experience different behaviour with OpenJDK 6, though. The worst part is this is the default Java version in Ubuntu 12.04 so potentially a lot of users can experience this problem.
Comment 8 Ondrej Vrabec 2013-01-28 09:09:59 UTC
*** Bug 225360 has been marked as a duplicate of this bug. ***
Comment 9 gabybosetti 2013-12-01 06:30:59 UTC
Just install Oracle Java and it will be working.
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html