An OCaml program is supposed to talk with some java-based software.
This software provides a java API that allows to create a plugin to it.
I don’t want to write in java this plugin for all reasons you can imagine.
I’ve found theses resources:
opam - javalib : “Javalib is a library that parses Java .class files into OCaml data structures. Javalib offers primitives to extract information from, manipulate, and generate valid .class files.”
opam - sawja : “… Whereas Javalib is dedicated to isolated classes, Sawja handles bytecode programs with their class hierarchy and control flow algorithms.”
GitHub - xavierleroy/camljava: Low-level OCaml/Java interface seems created in 2002 and has a v0.5 in 2024. And is not on opam.
http://ocamljava.org/ is still “under construction” for ages (at least 10 years). And is not on opam.
And there are other opam packages related to “java” :
Name Latest version Description
atdj 3.0.1 Java code generation for ATD
diffast-langs-java 0.3.6 Java parser plugin for Diff/AST
diffast-langs-java-parsing 0.3.6 Java parser for Diff/AST
diffast-langs-java-parsing-cli 0.3.6 Java parser CLI
diffast-langs-java-spec 0.3.6 Java parser spec for Diff/AST
What is the more easy, fast and reliable way to program in Ocaml a java plugin based on a java API?
Tools are:
- a set of relevant OCaml packages
- a java API to the target software
- an OCaml source program
The deliverable is:
- a java plugin (that conforms to the provided java API)