X

Java and NetBeans on Ubuntu 8.04

Guest Author

I have upgraded my Ubuntu installation to 8.04 (release candidate). Previously Ubuntu has been using GCJ as the default Java, which had many problems. On 8.04 when I tried:

java -version

I got:

java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Server VM (build 1.6.0-b09, mixed mode)

Very cool. Now what about NetBeans? I tried:

netbeans

And the response was:

The program 'netbeans' is currently not installed.  You can install it by typing:
sudo apt-get install netbeans

So I tried:

sudo apt-get install netbeans

In previous versions of Ubuntu I would have to go install NetBeans manually but this time a little miracle happened:

[sudo] password for roman:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  ant ant-optional javahelp2 junit junit4 libappframework-java libapr1
  libaprutil1 libbeansbinding-java libcommons-beanutils-java
  libcommons-collections3-java libcommons-digester-java
  libcommons-logging-java libdb4.5-java libfreemarker-java libini4j-java
  libjsch-java libjtidy-java liblucene2-java libnb-apisupport1-java
  libnb-ide8-java libnb-java1-java libnb-javaparser-java
  libnb-platform7-devel-java libnb-platform7-java libnb-svnclientadapter-java
  libpq5 libregexp-java libservlet2.3-java libsvn1 libswing-layout-java
  libswingworker-java libxml-commons-resolver1.1-java openjdk-6-jdk subversion
Suggested packages:
  ant-doc libbsf-java liboro-java liblog4j1.2-java jython antlr libbcel-java
  libjdepend-java libgnumail-java libcommons-net-java javacc javahelp2-doc
  junit-doc libappframework-java-doc libswingworker-java-doc
  libcommons-beanutils-java-doc libcommons-collections3-java-doc
  liblogkit-java libavalon-framework-java libjtidy-java-doc
  libswing-layout-java-doc libxml-commons-resolver1.1-java-doc openjdk-6-demo
  openjdk-6-source db4.6-util patch subversion-tools
Recommended packages:
  ant-gcj ant-optional-gcj libdb4.5-java-gcj jetty
The following NEW packages will be installed:
  ant ant-optional javahelp2 junit junit4 libappframework-java libapr1
  libaprutil1 libbeansbinding-java libcommons-beanutils-java
  libcommons-collections3-java libcommons-digester-java
  libcommons-logging-java libdb4.5-java libfreemarker-java libini4j-java
  libjsch-java libjtidy-java liblucene2-java libnb-apisupport1-java
  libnb-ide8-java libnb-java1-java libnb-javaparser-java
  libnb-platform7-devel-java libnb-platform7-java libnb-svnclientadapter-java
  libpq5 libregexp-java libservlet2.3-java libsvn1 libswing-layout-java
  libswingworker-java libxml-commons-resolver1.1-java netbeans openjdk-6-jdk
  subversion
0 upgraded, 36 newly installed, 0 to remove and 0 not upgraded.
Need to get 39.7MB of archives.
After this operation, 126MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ubuntu.sh.cvut.cz hardy/universe openjdk-6-jdk 6b09-0ubuntu2 [9376kB]
Get:2 http://ubuntu.sh.cvut.cz hardy/main ant 1.7.0-3 [1281kB]                
Get:3 http://ubuntu.sh.cvut.cz hardy/main ant-optional 1.7.0-3 [694kB]        
Get:4 http://ubuntu.sh.cvut.cz hardy/universe javahelp2 2.0.05-3 [2094kB]     
Get:5 http://ubuntu.sh.cvut.cz hardy/main junit 3.8.2-1 [72.8kB]              
Get:6 http://ubuntu.sh.cvut.cz hardy/universe junit4 4.3.1-2 [235kB]          
Get:7 http://ubuntu.sh.cvut.cz hardy/universe libswingworker-java 1.1-0ubuntu2 [13.5kB]
Get:8 http://ubuntu.sh.cvut.cz hardy/universe libappframework-java 1.03-0ubuntu2 [103kB]
Get:9 http://ubuntu.sh.cvut.cz hardy/main libapr1 1.2.11-1 [115kB]            
Get:10 http://ubuntu.sh.cvut.cz hardy/main libpq5 8.3.1-1 [259kB]             
Get:11 http://ubuntu.sh.cvut.cz hardy/main libaprutil1 1.2.12+dfsg-3 [70.0kB] 
Get:12 http://ubuntu.sh.cvut.cz hardy/universe libbeansbinding-java 1.2.1-0ubuntu2 [177kB]
Get:13 http://ubuntu.sh.cvut.cz hardy/main libcommons-collections3-java 3.1a-3.1 [581kB]
Get:14 http://ubuntu.sh.cvut.cz hardy/main libservlet2.3-java 4.0-10 [253kB]  
Get:15 http://ubuntu.sh.cvut.cz hardy/main libcommons-logging-java 1.1-1ubuntu1 [195kB]
Get:16 http://ubuntu.sh.cvut.cz hardy/main libcommons-beanutils-java 1.8.0~beta-1 [201kB]
Get:17 http://ubuntu.sh.cvut.cz hardy/universe libcommons-digester-java 1.8-1 [387kB]
Get:18 http://ubuntu.sh.cvut.cz hardy/universe libdb4.5-java 4.5.20-11 [774kB]
Get:19 http://ubuntu.sh.cvut.cz hardy/universe libfreemarker-java 2.3.10-6 [1071kB]
Get:20 http://ubuntu.sh.cvut.cz hardy/universe libini4j-java 0.2.6-0ubuntu2 [40.9kB]
Get:21 http://ubuntu.sh.cvut.cz hardy/main libjsch-java 0.1.37-2 [206kB]      
Get:22 http://ubuntu.sh.cvut.cz hardy/universe libjtidy-java 7+svn20070309-1 [235kB]
Get:23 http://ubuntu.sh.cvut.cz hardy/main libregexp-java 1.4-4 [89.7kB]      
Get:24 http://ubuntu.sh.cvut.cz hardy/universe liblucene2-java 2.2.0-2ubuntu2 [1119kB]
Get:25 http://ubuntu.sh.cvut.cz hardy/universe libswing-layout-java 1.0.3-1 [51.9kB]
Get:26 http://ubuntu.sh.cvut.cz hardy/universe libnb-platform7-java 6.0.1-0ubuntu3 [3715kB]
Get:27 http://ubuntu.sh.cvut.cz hardy/main libsvn1 1.4.6dfsg1-2ubuntu1 [594kB]
Get:28 http://ubuntu.sh.cvut.cz hardy/main subversion 1.4.6dfsg1-2ubuntu1 [243kB]
Get:29 http://ubuntu.sh.cvut.cz hardy/universe libnb-svnclientadapter-java 6.0.1-0ubuntu2 [123kB]
Get:30 http://ubuntu.sh.cvut.cz hardy/main libxml-commons-resolver1.1-java 1.2-1 [83.7kB]
Get:31 http://ubuntu.sh.cvut.cz hardy/universe libnb-ide8-java 6.0.1-0ubuntu2 [6402kB]
Get:32 http://ubuntu.sh.cvut.cz hardy/universe libnb-javaparser-java 6.0-0ubuntu2 [1229kB]
Get:33 http://ubuntu.sh.cvut.cz hardy/universe libnb-java1-java 6.0.1-0ubuntu2 [5568kB]
Get:34 http://ubuntu.sh.cvut.cz hardy/universe libnb-platform7-devel-java 6.0.1-0ubuntu3 [185kB]
Get:35 http://ubuntu.sh.cvut.cz hardy/universe libnb-apisupport1-java 6.0.1-0ubuntu2 [980kB]
Get:36 http://ubuntu.sh.cvut.cz hardy/universe netbeans 6.0.1-0ubuntu2 [833kB]
Fetched 39.7MB in 32s (1203kB/s)                                              
Extracting templates from packages: 100%
Selecting previously deselected package openjdk-6-jdk.
(Reading database ... 102192 files and directories currently installed.)
Unpacking openjdk-6-jdk (from .../openjdk-6-jdk_6b09-0ubuntu2_i386.deb) ...
Selecting previously deselected package ant.
Unpacking ant (from .../archives/ant_1.7.0-3_all.deb) ...
Selecting previously deselected package ant-optional.
Unpacking ant-optional (from .../ant-optional_1.7.0-3_all.deb) ...
Selecting previously deselected package javahelp2.
Unpacking javahelp2 (from .../javahelp2_2.0.05-3_all.deb) ...
Selecting previously deselected package junit.
Unpacking junit (from .../archives/junit_3.8.2-1_all.deb) ...
Selecting previously deselected package junit4.
Unpacking junit4 (from .../junit4_4.3.1-2_all.deb) ...
Selecting previously deselected package libswingworker-java.
Unpacking libswingworker-java (from .../libswingworker-java_1.1-0ubuntu2_all.deb) ...
Selecting previously deselected package libappframework-java.
Unpacking libappframework-java (from .../libappframework-java_1.03-0ubuntu2_all.deb) ...
Selecting previously deselected package libapr1.
Unpacking libapr1 (from .../libapr1_1.2.11-1_i386.deb) ...
Selecting previously deselected package libpq5.
Unpacking libpq5 (from .../libpq5_8.3.1-1_i386.deb) ...
Selecting previously deselected package libaprutil1.
Unpacking libaprutil1 (from .../libaprutil1_1.2.12+dfsg-3_i386.deb) ...
Selecting previously deselected package libbeansbinding-java.
Unpacking libbeansbinding-java (from .../libbeansbinding-java_1.2.1-0ubuntu2_all.deb) ...
Selecting previously deselected package libcommons-collections3-java.
Unpacking libcommons-collections3-java (from .../libcommons-collections3-java_3.1a-3.1_all.deb) ...
Selecting previously deselected package libservlet2.3-java.
Unpacking libservlet2.3-java (from .../libservlet2.3-java_4.0-10_all.deb) ...
Selecting previously deselected package libcommons-logging-java.
Unpacking libcommons-logging-java (from .../libcommons-logging-java_1.1-1ubuntu1_all.deb) ...
Selecting previously deselected package libcommons-beanutils-java.
Unpacking libcommons-beanutils-java (from .../libcommons-beanutils-java_1.8.0~beta-1_all.deb) ...
Selecting previously deselected package libcommons-digester-java.
Unpacking libcommons-digester-java (from .../libcommons-digester-java_1.8-1_all.deb) ...
Selecting previously deselected package libdb4.5-java.
Unpacking libdb4.5-java (from .../libdb4.5-java_4.5.20-11_i386.deb) ...
Selecting previously deselected package libfreemarker-java.
Unpacking libfreemarker-java (from .../libfreemarker-java_2.3.10-6_all.deb) ...
Selecting previously deselected package libini4j-java.
Unpacking libini4j-java (from .../libini4j-java_0.2.6-0ubuntu2_all.deb) ...
Selecting previously deselected package libjsch-java.
Unpacking libjsch-java (from .../libjsch-java_0.1.37-2_all.deb) ...
Selecting previously deselected package libjtidy-java.
Unpacking libjtidy-java (from .../libjtidy-java_7+svn20070309-1_all.deb) ...
Selecting previously deselected package libregexp-java.
Unpacking libregexp-java (from .../libregexp-java_1.4-4_all.deb) ...
Selecting previously deselected package liblucene2-java.
Unpacking liblucene2-java (from .../liblucene2-java_2.2.0-2ubuntu2_all.deb) ...
Selecting previously deselected package libswing-layout-java.
Unpacking libswing-layout-java (from .../libswing-layout-java_1.0.3-1_all.deb) ...
Selecting previously deselected package libnb-platform7-java.
Unpacking libnb-platform7-java (from .../libnb-platform7-java_6.0.1-0ubuntu3_all.deb) ...
Selecting previously deselected package libsvn1.
Unpacking libsvn1 (from .../libsvn1_1.4.6dfsg1-2ubuntu1_i386.deb) ...
Selecting previously deselected package subversion.
Unpacking subversion (from .../subversion_1.4.6dfsg1-2ubuntu1_i386.deb) ...
Selecting previously deselected package libnb-svnclientadapter-java.
Unpacking libnb-svnclientadapter-java (from .../libnb-svnclientadapter-java_6.0.1-0ubuntu2_all.deb) ...
Selecting previously deselected package libxml-commons-resolver1.1-java.
Unpacking libxml-commons-resolver1.1-java (from .../libxml-commons-resolver1.1-java_1.2-1_all.deb) ...
Selecting previously deselected package libnb-ide8-java.
Unpacking libnb-ide8-java (from .../libnb-ide8-java_6.0.1-0ubuntu2_all.deb) ...
Selecting previously deselected package libnb-javaparser-java.
Unpacking libnb-javaparser-java (from .../libnb-javaparser-java_6.0-0ubuntu2_all.deb) ...
Selecting previously deselected package libnb-java1-java.
Unpacking libnb-java1-java (from .../libnb-java1-java_6.0.1-0ubuntu2_all.deb) ...
Selecting previously deselected package libnb-platform7-devel-java.
Unpacking libnb-platform7-devel-java (from .../libnb-platform7-devel-java_6.0.1-0ubuntu3_all.deb) ...
Selecting previously deselected package libnb-apisupport1-java.
Unpacking libnb-apisupport1-java (from .../libnb-apisupport1-java_6.0.1-0ubuntu2_all.deb) ...
Selecting previously deselected package netbeans.
Unpacking netbeans (from .../netbeans_6.0.1-0ubuntu2_all.deb) ...
Setting up openjdk-6-jdk (6b09-0ubuntu2) ...

Setting up ant (1.7.0-3) ...
Setting up ant-optional (1.7.0-3) ...
Setting up javahelp2 (2.0.05-3) ...
Setting up junit (3.8.2-1) ...
Setting up junit4 (4.3.1-2) ...
Setting up libswingworker-java (1.1-0ubuntu2) ...
Setting up libappframework-java (1.03-0ubuntu2) ...
Setting up libapr1 (1.2.11-1) ...

Setting up libpq5 (8.3.1-1) ...

Setting up libaprutil1 (1.2.12+dfsg-3) ...

Setting up libbeansbinding-java (1.2.1-0ubuntu2) ...
Setting up libcommons-collections3-java (3.1a-3.1) ...
Setting up libservlet2.3-java (4.0-10) ...
Setting up libcommons-logging-java (1.1-1ubuntu1) ...

Setting up libcommons-beanutils-java (1.8.0~beta-1) ...
Setting up libcommons-digester-java (1.8-1) ...

Setting up libdb4.5-java (4.5.20-11) ...
Setting up libfreemarker-java (2.3.10-6) ...

Setting up libini4j-java (0.2.6-0ubuntu2) ...
Setting up libjsch-java (0.1.37-2) ...
Setting up libjtidy-java (7+svn20070309-1) ...
Setting up libregexp-java (1.4-4) ...

Setting up liblucene2-java (2.2.0-2ubuntu2) ...
Setting up libswing-layout-java (1.0.3-1) ...
Setting up libnb-platform7-java (6.0.1-0ubuntu3) ...
Setting up libsvn1 (1.4.6dfsg1-2ubuntu1) ...

Setting up subversion (1.4.6dfsg1-2ubuntu1) ...
Setting up libnb-svnclientadapter-java (6.0.1-0ubuntu2) ...
Setting up libxml-commons-resolver1.1-java (1.2-1) ...
Setting up libnb-ide8-java (6.0.1-0ubuntu2) ...
Setting up libnb-javaparser-java (6.0-0ubuntu2) ...
Setting up libnb-java1-java (6.0.1-0ubuntu2) ...
Setting up libnb-platform7-devel-java (6.0.1-0ubuntu3) ...
Setting up libnb-apisupport1-java (6.0.1-0ubuntu2) ...
Setting up netbeans (6.0.1-0ubuntu2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

And then running:

netbeans

opened version 6.0.1 of my favorite IDE (the Java-only version of it) :)

Note that NetBeans is in the Universe which needs to be checked in the package manager. I didn't have to do this because I already got downloaded some packages from the Universe before. Also, the packages are split into pieces - there is one package for the platform, one for the beans binding, etc.

Opening the package manager and searching for NetBeans yields to:


Getting Java and NetBeans used to be complicated on Ubuntu in the past but now both packages are really well integrated and easily accessible.

Join the discussion

Comments ( 12 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha