The challenge is to do this without installing java, using only the app called 'jar launcher' that is included with MacOS.Jar Launcher is located in /System/Library/CoreServices/Jar Launcher.app as part of Apple Computer's Java implementation, installed by default on Mac OS X (not from 10.11 - see link ). Java programs without any GUI should be run from the command line as they may not properly execute without a pseudo terminal.
Jar Launcher does not execute the Java files itself, rather it passes them to the Java Virtual Machine (JVM) with any appropriate parameters. Jar Launcher also launches a class in the same manner. Jar Launcher is the program in Mac OS X that launches JavaJAR files into the Aqua/Java runtime environment when the JAR file is double clicked.