You should make sure you have the latest JDK (1.6) installed and when you compile your program and you need it to be compatible on a lower version you use the -source and -target directives.

See...