Managing multiple Java Installations
The /Library/Internet Plug-Ins/JavaAppletPlugin.plugin (the JRE) is the one that launches the executable jar though 'JarLauncher.app' - and it is the one installed from Oracle - and it is the last installed JDK.

So if you say you have JDK 9 from Oracle, as the only one from Oracle, then it will be JavaAppletPlugin.plugin of JDK 9 that should be used right now - which doesn't work together with JDK 8 (out of the box).

One thing you could try is to install all your JDKs from Oracle, and then one by one save the JavaAppletPlugin.plugin of each version you want to use in a folder of choice, from where you then copy/override the current plugin in /Library/Internet Plug-Ins/ - maybe create a small Terminal script, containing setting JAVA_HOME and copy/override of plugin - you will then execute this script just before you want to test your executable jar.

EDIT:

I think after some thinking, that you first need to do some clean up.

This means delete /Library/Internet Plug-Ins/JavaAppletPlugin.plugin and all JDKs under /Library/Java/JavaVirtualMachines/.

Then download all needed JDKs from Oracle, and install them one by one - lowest version first, and remember to backup the installed /Library/Internet Plug-Ins/JavaAppletPlugin.plugin after each install to a folder of choice.

I have saved my plugins with the names:


JavaAppletPlugin-7.0.80.plugin
JavaAppletPlugin-8.0.162.plugin
JavaAppletPlugin-9.0.4.plugin


You should also be able to open the java control panel for each installed JDK - but only for the one you currently has installed.

Now you can create a script which updates the /Library/Internet Plug-Ins/JavaAppletPlugin.plugin - below is a quick script I did where it install the JRE 7_80 plugin (replace &lt;PATH_TO_BACKUP_OF_PLUGINS> with you path) - which also is the java control panel, so you should be able to open it from Settings.

#!/bin/sh

sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
sudo cp -rf "&lt;PATH_TO_BACKUP_OF_PLUGINS&gt;/JavaAppletPlugin-7.0.80.plugin" "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"


If you want one script for each plugin, or you'll create one script which takes a version input, is up to you.

JavaAppletPlugin.plugin and JAVA_HOME need to follow each other, maybe you already has a way for switching JAVA_HOME today.

The way I usually set my JAVA_HOME is like below, where I have added some functions to my .bash_profile

jdk7() {
   export JAVA_HOME=`/usr/libexec/java_home -v '1.7.*'`
   export PATH=$JAVA_HOME/bin:$PATH
}

jdk8() {
   export JAVA_HOME=`/usr/libexec/java_home -v '1.8.*'`
   export PATH=$JAVA_HOME/bin:$PATH
}

jdk9() {
   export JAVA_HOME=`/usr/libexec/java_home -v '9.*'`
   export PATH=$JAVA_HOME/bin:$PATH
}