Thursday, March 25, 2010

Experimenting Java Enterprise Edition (EE) SDK 6 on Ubuntu Linux

Installations
Soon after downloading the Java EE on Ubuntu machine through the website the file (~48 MB) called java_ee_sdk-6-web-unix.sh. An attempt to run the shell script resulted in the following error.
Could not locate a suitable Java runtime.
Please ensure that you have Java 6 or newer installed on your system
and accessible in your PATH or by setting JAVA_HOME
This requires installation of Java 6 by using the following command (another roughly 55 MB).
$ sudo apt-get install sun-java6-jdk
Now going back to the Java EE installation through the following command.
$ sh java_ee_sdk-6-web-unix.sh
Going through the clicks (one has to only write the password for admin account and the proxy if any). Rest of the information is filled in by default.

Verifying Installation
Now go to the web browser and type the following in the address box.
http://localhost:4848
If you changed the value of admin control panel port. Please replace 4848 with the port number you specified during installation. This would open the administration control panel (shown below) and demand user name and password. Please put the username/ password which were set during installation.






After the username and password has been entered the following window will appear.




Deploying Sample Application

Download the application hello.war from the website here. Click on Applications on the tree on the right side and click the button deploy and then point to the path where the hello.war was downloaded.

Then write the following in the address box of the web browser and write your name in the box and click submit.

http://localhost:8080/hello/


The following output will appear hence showing that the Java EE 6 has not only been installed but also working.

The next step is to develop applications using the Java EE standard. This requires knowledge of EJB, Components, three tier architecture and advanced java programming.

1 comment: