Docs GODI Archive
Projects Blog Link DB

Look up function:

(e.g. "List.find" or "keysym")
More options



An O'Caml bytecode interpreter for Java

The goal of this project was to run O'Caml bytecode in a Java VM. This was accomplished by reimplementing the bytecode interpreter in Java. In 1998, when Java was fresh and innocent, this was a really cool idea, and maybe it still is. However, at that time the Java runtime was not fast enough to run useful code at decent speed. Today the performance is a lot better due to advanced JVM technology, and you could actually use it for simple tasks. Note that the demos included in the JavaCaml web site still work with current JVMs, so you can make a picture of your own.

JavaCaml is not a compiler, and cannot generate Java bytecode from O'Caml sources. This was out of reach for a spare time project.

The JavaCaml sources are no longer maintained, and it is probably not possible to use it with current O'Caml versions. There were often some slight modifications of the O'Caml bytecode, and this makes it unlikely that you can run O'Caml 3.10 bytecode with an interpreter written for O'Caml 3.00.

There are a few other projects that also aim at improving the O'Caml/Java interoperability:

  • CAMLJAVA allows you to call Java methods from O'Caml code and vice versa
  • O'Jacare is also an O'Caml/Java interface featuring a type-safe code generator
  • OCaml-Java runs O'Caml code in a JVM by generating Java bytecode. It also includes a runtime.
Link: JavaCaml
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml