Start New Discussion within our Software Development Community

Hey all

I started learning java and I installed it on my Desktop(XP) and it was fine I could run the programs I made it was all good. When I came round to installing java on my laptop running Ubuntu I followed the guide here
I I followed the Ubuntu Console method and it all installed fine.

I treied to run the following simple program just to test it out to see of the install was ok

public class Hellojava
	public static void main(String[] args)
		System.out.println("Hello Java");

and here is what i typed at the terminal, and the response I got which I do not understand.

hla@box:~/source/java$ javac
hla@box:~/source/java$ java Hellojava
Exception in thread "main" java.lang.UnsupportedClassVersionError: Hellojava (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(

Can anyone tell me what's going wrong please? DId i do something wrong or what?

Many thanks


This article has been dead for over six months. Start a new discussion instead.