#!wml --include=.. #use wml::std::page #use wml::std::lang #use wml::fmt::isolatin #use wml::std::case global=upper #include

The Open Runtime Platform () provides a covenient and simple platform for both using and testing GNU Classpath. With the release of ORP 1.0.8, GNU Classpath's native libraries are finally supported almost out of the box. A small patch is needed to correct a problem not detected before the release of this version of ORP and all subsequent versions are expected to work without it. This patch is in Classpath's CVS tree, classpath/resource/orp-1.0.8.patch.

Steps to use ORP+GNU Classpath on GNU/Linux

Example assumes ORP 1.0.8, see above. In the example, Classpath CVS is in ~/cvs/classpath/.

  • Obtain from Sourceforge
    1. wget http://prdownloads.sourceforge.net/orp/orp20011116.tgz
    2. tar -xzvf orp20011116.tgz
    3. mv orp orp-1.0.8
  • Apply the patch
    1. cd orp-1.0.8
    2. patch -p1 < ~/cvs/classpath/resource/orp-1.0.8.patch
  • Build ORP
    1. make NON_ORP_NATIVE_LIBS=-DNON_ORP_NATIVE_LIBS dbg

ORP should now be built and ready, orp-1.0.8/mains/orp/Linux/dbg/orp.

Using ORP+GNU Classpath on GNU/Linux

ORP needs to load shared libraries and the class library bytecode. The recommended method is to use the environment variable LD_LIBRARY_PATH to provide a colon separated list of directories in which to look for GNU Classpath's shared libraries. The example below assumes the user built and installed GNU Classpath without modifing the default prefix.

  • Set the LD_LIBRARY_PATH variable (assumes Bash shell)
    1. export LD_LIBRARY_PATH=/usr/local/classpath/lib/classpath
  • Set the CLASSPATH variable (ORP doesn't yet use this but it makes the command line easier).
    1. export CLASSPATH=/usr/local/classpath/share/classpath:.
  • Running HelloWorld with ORP
    1. orp-1.0.8/mains/orp/Linux/dbg/orp -swapjit 0 1 -classpath $CLASSPATH HelloWorld

ORP contains two JITs at this time. By default ORP 1.0.8 uses a so-called JIT 3 and for some things it appears to have more problems than when using JIT 1. This is the reasoning behind adding the -swapjit 0 1 argument to ORP. ORP does not have the ability at this time to execute raw bytecode and must use one of these two JIT compilers.