Again one idea, implementation of which I am not able to find on internet. Most of the time for testing purpose we need to run small piece of codes basically the non-UI code. And we do it a lot when we prepare for certification exams like SCJP or SCJA. Some small tricky questions ! Not only this most of the time JDK version matters because one can't run generics code with JDK 1.4 backwards.
Why not to make a small web based tool, which takes the java file as an input from user and give option to user to select which JDK version is required probably by radio button(radio button is a nice name, its like radio in which you can select only one station at a time, I wonder why not television button :-) ) and we show the output of that java file on a JSP page or we can also write it somewhere on a file, as user demand, after all user is God :-). For UI code, it will simple return a message like its a UI code and cant be displayed.
So, implementation is little like JFileChooser for selecting input file and for writing output file. Radio buttons for selection of JDK and thats it ! Rest my web server will take load of all JDK version and it will be the duty of code to run the java file on the appropriate JDK version.
Please give your useful comment on idea and also if there is anything exist like this. I would love to use it rather than writing :-).