I use some programs that have known bugs when using Java 1.7.x (default on my computer), issues that would be fixed using Java 1.6. However I also use program that works fine with the default Java and have known issues with older versions.
How can I run the program myprogram specifing the version of Java to use?