InstallationJava » History » Version 5

Version 4 (S. Wrede, 06/28/2011 09:38 PM) → Version 5/14 (J. Moringen, 08/30/2011 04:31 AM)

h1. Installation of RSB Java Implementation

For compilation and installation of the Java implementation, bindings, we use the "Ant":http://ant.apache.org/ build tool.

h2. External Dependencies

h3. Dependencies on Externals Libraries and Tools

Required:
* "CMake":http://www.cmake.org/ (tested with CMake version 2.8)
*
libprotobuf-java
* ant
* Daemon program of the "Spread group communication system":http://www.spread.org/

Optional:
** javadoc

h3. Dependencies on other RSB Sub-projects

The Java implementation of RSB depends on RSB's language independent network protocol specification. This specification is maintained in the "protocol sub-project of the RSB source tree":https://code.cor-lab.org/projects/rsb/repository/show/trunk/protocol.

Assuming the entire RSB source tree has been checked out into the current directory, the protocol sub-project can be built and installed using the following commands (@$prefix@ has to be replaced with a desired installation prefix):
<pre>
cd protocol/build && cmake .. -DCMAKE_INSTALL_PREFIX=$prefix && make && make install
</pre>

h2. Installation of RSB Core

*After installing the protocol sub-project* (see above)
# Checkout code
* Download src from Subversion repository SVN (see "front page":https://code.cor-lab.org/projects/rsb) front page)
# * Invoke @ant@ supplying build ant with a number of properties on for the commandline or via @build.properties@ (see below) build configuration:

The following properties are used to configure the build:
|_.Ant
| Ant Property |_.Meaning |_.Example |
Meaning | @prefix@ Example | Location into which RSB should be installed | @/vol/cit/share@ |
| @pbuf.protoc@ pbuf.protoc | Location of protocol buffer compiler (@protoc@ or @protoc.exe@ Protobuf Compiler | @/usr/bin/protoc@ /usr/bin/protoc |
| @pbuf.protopath@ pbuf.protopath | Location of RSB protocol Protocol IDL files (see TODO) Files | @/vol/cit/share/RSBProtocol@ /vol/cit/share/RSBProtocol |
| @pbuf.lib@ pbuf.lib | Location of Java protocol buffer runtime library Protobuf Library | @/usr/share/java/protobuf.jar@ /usr/share/java/protobuf.jar |
| @spread.daemon@ spread.daemon | Location of Spread Daemon Executable | @/vol/cit/sbin/spread@ /vol/cit/sbin/spread |

All properties can be supplied on the @ant@ commandline using the @-DNAME=VALUE@ syntax or by creating a @build.properties@ file containing lines of the form @NAME = VALUE@.

An exemplary @ant dist@ command, which builds ant dist command to build the RSB resulting jar library, library may look as follows:


<pre>
ant -Dpbuf.protoc=/usr/bin/protoc -Dpbuf.protopath=/vol/cit/share/RSBProtocol -Dpbuf.lib=/usr/share/java/protobuf.jar -Dspread.daemon=/vol/cit/sbin/spread dist
</pre>
The equivalent @build.properties@ file looks like this:
<pre>
pbuf.protoc = /usr/bin/protoc
pbuf.protopath = /vol/cit/share/RSBProtocol
pbuf.lib = /usr/share/java/protobuf.jar
spread.daemon = /vol/cit/sbin/spread dist
</pre>
In the presence of this file, the @ant@ command reduces to
<pre>
ant dist
</pre>


To install RSB * @ant install@ installs jars into the configured to prefix (e.g., into @${prefix}/share/java@), the following @ant@ command can be used
<pre>
ant install
</pre>
of your choice, e.g., ${prefix}/share/java (defined via property)

h2. Installation of RSB-XML

* for rsb-xml, you need to additionally install XOM (available via ubuntu)
* and pass the following parameters to the ant build script

|_.Ant | Ant Property |_.Meaning |_.Example | Meaning | Example |
| @pbuf.lib@ pbuf.lib | Location of Protobuf Library | @/usr/share/java/protobuf.jar@ /usr/share/java/protobuf.jar |
| @spread.daemon@ spread.daemon | Location of Spread Daemon Executable | @/vol/cit/sbin/spread@ /vol/cit/sbin/spread |
| @xom.lib@ xom.lib | Location of XOM XML Library | @/usr/share/java/xom-1.2.1.jar@ /usr/share/java/xom-1.2.1.jar |
| @rsb.lib@ rsb.lib | Location of RSB Core Library | @/vol/cit/lib/java/RSBJava.jar@ /vol/cit/lib/java/RSBJava.jar |