Java tutorial
import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; public class Main { public static void main(String[] args) { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine jsEngine = manager.getEngineByMimeType("text/javascript"); if (!(jsEngine == null)) { System.out.println("text/javascript MIME type retrieved:" + jsEngine); } ScriptEngine jsEngine2 = manager.getEngineByMimeType("text/vbscript"); if (jsEngine2 == null) System.out.println("\nNo supported script engine found for text/vbscript MIME type."); } }