Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.script.Compilable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class Main {
    public static void main(String[] args) throws Exception {
        ScriptEngineManager manager = new ScriptEngineManager();
        ScriptEngine engine = manager.getEngineByName("JavaScript");

        if (engine instanceof Compilable) {
            System.out.println("Script compilation is supported.");
        } else {
            System.out.println("Script compilation is not supported.");
        }

    }
}