The error message means that you have compiled your classes with JDK version 6, but that you are trying to run the classes on an older JRE (Java 5 or older).
Java is downwards compatible - classes compiled with an older version run unmodified on a newer version, but not upwards compatible - classes compiled with a newer version do not run on an older version.
Make sure you compile your source code with the right JDK version. JDK 1.4 is still
available for download on Sun's website.
You could use the -source and -target switches as Rob suggests, but if you use classes from the Java 6 standard API which don't exist in the older JRE, it will still not work correctly.