Important Note:

Compilation as described here probably only works on UNIX platforms. As I have no experience with Windows systems it is possible that there is somewhere UNIX specific code.
You need the following files and tools to be able to compile for JavaCaml: To compile sources you must use the ocamlc command without the -custom switch, and include the following additional options: Example: To compile the source use the following command:

ocamlc -I /usr/local/lib/ocaml/javacaml 
       -use_runtime /usr/local/lib/ocaml/javacaml/javacamlrun
       -o t

The result is written into the file t. If you have a working Java runtime system, you can simply execute t which is then run in the JavaCaml environment.

Running the compiled executable as stand-alone application

As already mentioned, the bytecode file finds automatically its Java runtime system (at least on UNIX platforms). If this does not work, try the following:

java ocaml.Exec Name_of_bytecode_file

If this command does not find the "java" executable, check your PATH. If it does not find the "ocaml.Exec" class, check your CLASSPATH. Change the values entered in the javacamlrun configuration section and compile this tool again.

Running the compiled executable as applet

See how to install JavaCaml on a Web server.