Running AutoLeveller and installing Java on Ubuntu 10.04

If, like me, you have downloaded the LinuxCNC livecd and installed it, then you probably have Ubuntu 10.04. AutoLeveller requires at least java 7 JRE to run, and since this is a very old version of Ubuntu, will have no support and will not be able to download JRE 7 or above easily.

With the advent of AutoLeveller 0.8 and its ‘probe persistence’ capabilities you probably will not want to run back and forth between machines so often. One machine to run AutoLeveller and generate GCode and the other machine to run LinuxCNC.

This guide shows you how to install JRE 8 on Ubuntu 10.04 and get AutoLeveller working.

Ubuntu and Java version check

To confirm which version of Ubuntu you have, open a command prompt and type:

lsb_release -a

I see the response:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid

If I type:

java -version

I see the response:

The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* openjdk-6-jre-headless
* cacao
* gij-4.3
* jamvm
Try: sudo apt-get install <selected package>

So, the latest version I can upgrade to is openjdk-6. Thats no good, AutoLeveller needs JRE 7 or above.

 Downloading and extracting Java 8

At the time of writing Java 8 is the latest version of Java. We only require Java 7 but Java 8 is OK to install.
create directory /usr/java/ by typing...

sudo mkdir /usr/java

Go to:
and download the JRE 8 tar.gz file (NOTE: Whilst the file I downloaded is: jre-8u5-linux-i586.tar.gz, your file may have a slightly different name depending on the version you download. The important points are to download any JRE version from Java 7 which is a tarball file, i.e. .tar.gz)
Move the download to /usr/java/ with

sudo mv ~/Downloads/jre-8u5-linux-i586.tar.gz /usr/java/

Navigate there with...

cd /usr/java/

extract the file with...

sudo tar -xzvf jre-8u5-linux-i586.tar.gz

NOTE: In my case, the files were extracted to /usr/java/jre1.8.0_05

Adding symbolic links

To link the new files, so that Ubuntu knows where to find the new Java…

sudo ln -s /usr/java/jre1.8.0_05 /usr/java/jre8
sudo ln -s /usr/java/jre8 /usr/java/latest
sudo ln -s /usr/java/latest /usr/java/default
sudo ln -s /usr/java/default/bin/java /usr/bin/java
sudo ln -s /usr/java/default/bin/javac /usr/bin/javac
sudo ln -s /usr/java/default/bin/javah /usr/bin/javah
sudo ln -s /usr/java/default/bin/javadoc /usr/bin/javadoc
sudo ln -s /usr/java/default/bin/javaws /usr/bin/javaws

Checking installation


ls -al /usr/bin/java*

should show the links just created…

lrwxrwxrwx 1 root root 26 2014-06-21 15:52 /usr/bin/java -> /usr/java/default/bin/java
lrwxrwxrwx 1 root root 27 2014-06-21 15:45 /usr/bin/javac -> /usr/java/default/bin/javac
lrwxrwxrwx 1 root root 29 2014-06-21 15:46 /usr/bin/javadoc -> /usr/java/default/bin/javadoc
lrwxrwxrwx 1 root root 27 2014-06-21 15:46 /usr/bin/javah -> /usr/java/default/bin/javah
lrwxrwxrwx 1 root root 28 2014-06-21 15:47 /usr/bin/javaws -> /usr/java/default/bin/javaws


java -version

now gives:

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Server VM (build 25.5-b02, mixed mode)

Running AutoLeveller

download the jar from
make the jar executable with

chmod +x autoleveller-0.8.2.jar

then run the jar with

java -jar autoleveller-0.8.2.jar


Ubuntu 10.04 desktop with AutoLeveller running
Ubuntu 10.04 desktop with AutoLeveller running



The height adjusting CNC software