Javalib
Sawja
Documentation
If you need documentation, you can:
- read the on-line tutorial (old versions)
- read the on-line API documentation (old versions)
- make the documentation (see INSTALL file) and read starting from javalib/doc/api/index.html
- browse the .mli files in the source
- read the Java Virtual Machine Specifications for more information about the class file format
- post a message or send an email (see Contacts)
Javalib is distributed with an implementation of Patricia trees. The documentation is in the interface files in javalib/ptrees/.
Installation Procedure for Javalib
For the impatient, familiar, or audacious
- tar xf javalib-2.2.1.tar.bz2
- cd javalib-2.2.1
- ./configure.sh
- if there are missing dependencies,
- if ptrees was not found,
make ptrees && make installptrees - if camlzip was not found,
make camlzip && make installcamlzip - if extlib was not found,
make extlib && make installextlib - once all dependencies have been installed,
./configure.sh
- if ptrees was not found,
- make && make install
You may need superuser rights for the installation phases.
Detailed instructions
- Javalib makes extensive use of the Findlib package manager (>=1.2.3) and its Ocamlfind front-end, which provide seamless management of OCaml libraries. Make sure you have an Objective Caml compiler (>=3.10.0) installed, as well as the findlib/ocamlfind tools.
- Javalib depends on three unrelated libraries: ExtLib (>=1.5.1), CamlZip
(>=1.04), and PTrees. Some or all of these libraries might be provided as
precompiled packages or ports in your operating system. E.g., for CamlZip, one
can use:
- the 'libextlib-ocaml-dev' package in Debian, Ubuntu & Co.,
- the 'ocaml-extlib' package in Fedora or in Mac/Darwin Ports.
- First you need to configure the system. It is done automatically with the
command:
- ./configure.sh [options]
- -l <dir>
- Proceed to install in the local directory <dir>. Note that if you use Ocamlfind to compile an analysis later on, you will need to set the shell variable OCAMLPATH to <dir> to be able to use the Javalib libraries (see man findlib for more info on OCAMLPATH).
- -d yes|no|prof (default: yes)
- Set to yes to keep debugging information in native library or to prof to profile (with gprof) your program.
The configuration script generates a file called "Makefile.config". You are welcome to review and edit it, but keep in mind it will be overwritten with each execution of configure.sh. - Step 3 will have stated which of the libraries CamlZip, PTrees, or ExtLib
needed to be compiled and installed. For each of those required, run the
following commands:
- make LIBRARYNAME
- make installLIBRARYNAME (if configure was run with the --local option)
- sudo make installLIBRARYNAME (else)
- Now we can check if the dependencies are correctly found---remember to run
the script with the same options as in step 3.
- ./configure.sh [options]
- We can now proceed to the Javalib compilation. In the toplevel directory,
enter:
- make
- make install (if configure was run with the --local option)
- sudo make install (otherwise)
- If you want the documentation, run:
- make doc
- Finally, you can clean the sources with:
- make clean
- If you want to verify that Javalib is correctly installed and
found by ocaml, this command should find the library path:
- ocamlfind query javalib