Installing Java5 on Ubuntu Linux 6.06

The Java5 JDK has been packaged as as .deb package ready to install on Ubuntu, without jumping through hoops downloading the RedHat .rpm version and converting to a .deb with the ‘java-package’ utility.

Enable the Multiverse pacakge catalog if you haven’t already done so – in the Software Preferences utility, select ‘Add’ and then select the ‘Multiverse’ option.

You can now install via the Package Manager, or from the command line: sudo apt-get install sun-java5-jdk

Ubuntu comes with the GNU Java compiler which is enabled by default. These instructions walk you through how to select which Java version to run,and how to change between multiple versions, eg gjc to Sun Java5

Enabling root user in Ubuntu

The root user in Ubuntu by default is assigned a random password and you are not given the option to change it during install time.

To change the password in order to logon as root, use the Users and Groups tool, locate the root user, then change the password.

Running scripts at predetermined times

You can use cron to schedule jobs to run at regular time intervals, but to run a script at a particular time and date, use the ‘at’ command.

at TIME [DATE] -f scriptname

where TIME is like 2:30pm or 10:00am, and date is in the format like ‘Mar 10’ or ‘Apr 01’.

To view scripts that are scheduled for execution, use the command: atq

This lists the scripts that are ‘queued’ for execution. The first digit on each line is the job number for each scheduled script. To remove/cancel a scheduled script, use the atrm command, with the job number.