Look at the command line options for javac, in particular the target option. This will allow you to compile and run on earlier version - provided of course the code does not use classes or libraries...