Erlang port to the Java Virtual Machine
Yariv Sadan
yarivvv@REDACTED
Wed May 31 15:12:34 CEST 2006
> Bonus: Java external libraries
> There are a lot of libraries in Java which could then be called without
> having to create large, special-purpose wrappers.
>
I looked at jinterface (never used it), and it seems like it would be
possible to write a generic tool that would expose any Java api to
Erlang via rpc using jinterface behind the scenes. It would be used by
starting up a JVM as in
java -jar erljava.jar -name jvm1 -input foo.jar
if foo.jar had a class such as
package mypkg;
class Foo {
public static String echo(String arg) { return arg; }
}
Erlang could invoke using a call such as
Str = call(jvm1, mypkg_foo, func, ["echo this"]).
Handling non-static functions is a bit harder as it would require
setting up remote stubs for remote objects.
I hope I'm not totally off track here :)
Yariv
More information about the erlang-questions
mailing list