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/
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.
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.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With