SUNScholar/Java Version 7

Introduction
DSpace versions => 4.2 require java version 7. Java version 7 is the default with Ubuntu 14.04 LTS, but not Ubuntu 12.04 LTS.

Follow the instructions below to install and setup java 7 as default on an Ubuntu 12.04 LTS server.

This should be done before you attempt to upgrade to DSpace 4.2.

Install Java7
sudo apt-get install openjdk-7-jdk openjdk-7-jre sudo cd /usr/lib/jvm
 * Install Java 7
 * Remove default java symlink

sudo rm default-java

Select 64bit or 32bit
sudo ln -s java-1.7.0-openjdk-amd64 default-java
 * Add new symlink depending on 32 or 64 bit architecture
 * or for a 32 bit server

sudo ln -s java-1.7.0-openjdk-i386 default-java

Select 64bit or 32bit
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
 * Setup default java binaries depending on 32 or 64 bit architecture
 * or for a 32 bit server

sudo update-java-alternatives -s java-1.7.0-openjdk-i386

Post-installation checks
java -showversion The following should display java version "1.7.0_65" OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
 * Check java version

Restart Tomcat
sudo service tomcat6 restart
 * Restart the Tomcat6 server