Java - Scripting
Table of Contents
About
Articles Related
Dynamic Languages
- AspectJ
- Ceylon
- Clojure
- Duby
- Fantom
- Groovy
- Ioke
- Jaskell
- JRuby
- Noop
- Scala
- XTend
Groovy en Scala are in Java 7 supported.
Javascript
Javascript:
J2V8 is not a scripting language but a binding.
public class EclipseCon_snippet5 {
public static class Printer {
public void print(String string) {
System.out.println(string);
}
}
public static void main(String[] args) {
V8 v8 = V8.createV8Runtime();
v8.registerJavaMethod(new Printer(), "print", "print", new Class<?>[]{String.class});
v8.executeVoidScript( "print('Hello, World!');" );
v8.release(true);
}
}