Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Extraire le Nom Enregistré d’un Moteur de Script


{filelink=957}

 
import java.util.List;
 
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
 
public class NomsScripts {
  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("Nom: " + i + " " + (String) regNames.get(i) + "n");
        }
    }
  }
}

A Voir sur le même Sujet:

  • javax.script