import java.util.List;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
public class RegisteredNameDemo {
public static void main(String[] args) {
ScriptEngineManager manager = new ScriptEngineManager();
List<ScriptEngineFactory> factories = manager.getEngineFactories();
for (ScriptEngineFactory factory : factories) {
List<String> regNames = factory.getNames();
for (int i = 0; i < regNames.size(); i++) {
System.out.printf("Registered name " + i + " " + (String) regNames.get(i) + "\n");
}
}
}
}
|