JavaEE Setup on Ubuntu 14.04

Guide for n00bs, which I am when it comes to JavaEE.

Assuming a fresh and up-to-date installation of Ubuntu 14.04

Install Java - this is the runtime environment so your java application can be executed. I tried using openjdk from the repos but it’s only java7 and java8 is required, so use the ppa to install Oracle java8.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Install Glassfish - this is basically an app that runs on your server and manages / exposes the various different JavaEE applications you’re going to write. I think of GlassFish as a container or a gateway or a wrapper or an os-in-an-os or an admin panel.

Go to the site at https://glassfish.java.net/download.html which will give instructions to download the file. The download and extraction is outlined below

wget http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip
unzip glassfish-4.1.zip
rm glassfish-4.1.zip

Start Glassfish

./glassfish4/bin/asadmin start-domain

Set a password for the administrator so that you can access the administration interface remotely. If you’re only accessing this on localhost, you can skip this step.

The default administration account username is admin with blank password.

./glassfish4/bin/asadmin
change-admin-password
enable-secure-admin
restart-domain
exit

Log In To Glassfish

The administration is performed in your browser.

http://localhost:4848
or
https://REMOTE_IP:4848

This may show an error because the site is using a self-signed certificate. It’s safe to ignore the browser warning.

This interface is where you can deploy your particular JavaEE applications etc.

Next step is to create and upload a JavaEE application.

 
9
Kudos
 
9
Kudos

Now read this

Bitcoin for travelers

Is bitcoin a good option as a way of obtaining cash when traveling? On my recent travels from Australia to Singapore I decided to test this. The hope was to save myself from high fees and bad exchange rates at airports and banks. Here’s... Continue →