Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a list of available JSR-223 scripting languages? [closed]

I need a JVM-based scripting language for my app and would like to see what else is out there besides Groovy, Ruby, and Python.

Google keeps pointing me to a dead page at http://scripting.dev.java.net/

like image 856
HDave Avatar asked Aug 07 '12 02:08

HDave


People also ask

What JSR 223?

JSR223 (spec ) is a standard scripting API for Java Virtual Machine (JVM) languages . The JVM languages provide varying levels of support for the JSR223 API and interoperability with the Java runtime.

What is Java scripting API?

The Java Scripting API consists of classes and interfaces from the javax.script package. It is a relatively small and simple package with the ScriptEngineManager class as the starting point.


1 Answers

This is not a official list, but you can start here: http://en.wikipedia.org/wiki/List_of_JVM_languages

Rhino (JavaScript) is implemented in the Oracle JDK/JRE by default.

With this code you can see what scripting languages are available in your JDK:

import java.util.*; import javax.script.*;  public class A {      public static void main( String[] args ) {          ScriptEngineManager mgr = new ScriptEngineManager();         List<ScriptEngineFactory> factories = mgr.getEngineFactories();          for (ScriptEngineFactory factory : factories) {              System.out.println("ScriptEngineFactory Info");              String engName = factory.getEngineName();             String engVersion = factory.getEngineVersion();             String langName = factory.getLanguageName();             String langVersion = factory.getLanguageVersion();              System.out.printf("\tScript Engine: %s (%s)%n", engName, engVersion);              List<String> engNames = factory.getNames();             for(String name : engNames) {                 System.out.printf("\tEngine Alias: %s%n", name);             }              System.out.printf("\tLanguage: %s (%s)%n", langName, langVersion);          }      }  } 

This example was obtained here: http://www.oracle.com/technetwork/articles/javase/scripting-140262.html

You may want to try Lua too. Take a look here: how can I embed lua in java?

like image 57
davidbuzatto Avatar answered Nov 01 '22 21:11

davidbuzatto