How to install Java EE 5 SDK on Ubuntu

OS: Ubuntu 8.04 (Hardy Heron)
Date: Sep 11, 2008

Oh yes, this is yet another task that I have to refer to the internet to get done. So, let is get the Java 5 EE SDK installed on Ubuntu. This tutorial can also be applied for other distributions but I would stick to Ubuntu since that is what I use and also widely used.

Step 1: Download

The Java 5 EE SDK can be downloaded from here. Please download the appropriate version from that page depending on what you intend to do with it. The downloaded file would be named something like java_ee_sdk-5_05-linux.bin.

Step 2: Installation

To install the SDK, fire up a terminal and login as root. This is not required if you plan to install the SDK in your home folder. Change to the directory where the file you just downloaded resides. Once there type the command

./java_ee_sdk-5_05-linux.bin

If all is well, then the installation should proceed and an installation window should popup. If you just see the logo but no buttons on this window, just minimize the window and restore it again. This is known to happen on systems that have compiz-fusion installed. Proceed with the installation by providing the installation directory, admin passwrod etc. I was logged in as root when I did the installation and the installation directory was defaulted to /opt/SDK.

Note: Problems encountered

1. When I executed the installation command, I got an error "./java_ee_sdk-5_05-linux-nojdk.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory". This requires the shared library libstdc++ to be installed so that the installer can function correctly. This can be achieved by the simple command

sudo apt-get install libstdc++5

2. No buttons on installation window

If you just see the logo but no buttons on the installation window, just minimize the window and restore it again. This is known to happen on systems that have compiz-fusion installed.

Step 3: Setting the Path

We can set the environment variable PATH to also go through the SDK installation directory so that the programs are available all across the system. In order to retain this setting even after a reboot, this information has to be added to one of the startup scripts. From the terminal type

gedit ~/.bash_profile

This would open the .bash_profile file in the default text editor on Ubuntu. This file exists under the user's home folder and will be hidden by default. Scroll to the end of the file and add the lines

export JAVA_HOME=/opt/SDK/jdk/bin

export PATH=$PATH:/opt/SDK/jdk/bin

Make sure to save the file and we are all set to deploy cool Java EE applications. Just by adding these two lines in the .bashrc file, the path information would be retained after a reboot.

Step 4: Verifying the installation

The installation of the Java 5 EE can be verified by typing the below URL in a web browser

http://localhost:4848/login.jsf

Login with the username as admin and the password provided during installation.

BlinkListblogmarksdel.icio.usdiggFarkfeedmelinksFurlLinkaGoGoNewsVineNetvouzRedditYahooMyWebFacebook

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License