On Mon, Dec 14, 2015 at 9:25 AM, Chan Ngo wrote: > An alternative, if you want to do as follows: > - Compile Java program to an executable (not jar file) > - Call this executable and get the return values from it > > So you can think about Unix module in OCaml, you can use the standard I/O > to realize a communication channel between your OCaml code and the > executable Java. > https://ocaml.github.io/ocamlunix/ocamlunix.html > > If the data to be exchanged is structurally complex, then this technique becomes difficult; a cross-platform serialization library can be very helpful for generating appropriate serialization code in multiple languages. As one example, Cap'n Proto has bindings for both Java and OCaml: https://capnproto.org/otherlang.html Paul