The goal of the OCaml-Java project is to allow seamless integration of Objective Caml
Objective Caml is an excellent language but it sometimes lacks the library for a given task. On the other hand, Java is a weaker language but benefits from a tremendous community, and this manpower is able to deliver libraries for almost any task. It would thus be useful to be able to write a program in Objective Caml that use some Java libraries.
OCaml-Java is an effort to make Objective Caml available on the Java platform, currently supporting 3.11.2. The project has two concrete objectives: first, the ability to run Objective Caml sources that have been compiled using ocamlc
; second, the ability to compile Objective Caml sources into executable jar files.
Although only 1.4, the project already exhibits good compatibility with the original implementation: all language constructs are supported, the standard library is fully supported (even marshalling, lexing, and parsing), and all other
libraries are supported (this means that bigarray, dbm, dynlink, graph, labltk, num, str, unix, as well as threads are supported).
compiler is even able to build a working ocamlc.jar
file that is the Java-compiled version of the ocamlc
It is also possible to have a preview of Cadmium on this page
(Objective Caml toplevel run by the Cadmium interpreter). Warning: you will have to download a 3Mb signed applet (needs Java 1.6).
The different subprojects are released under different licences (GPL, LGPL or QPL) but the whole project is open-source. The licencing scheme may appear daunting but it aims to minimize developer difficulties by matching the scheme used by the Objective Caml project.
In order to improve the project, I am primarily looking for testers and bug reporters. Pointing errors in documentation and indicating where it should be enhanced is also very helpful.