Prerequisites
Make sure you have the following prerequisites installed. The commands listed below show how to install the prerequisites on Ubuntu Linux.
- C++ compiler (g++ or similar):
- cmake:
- Boost:
- zlib:
- OpenSSL:
- JDK:
- Protocol Buffers Java libraries:
sudo apt-get install g++
sudo apt-get install cmake
sudo apt-get install libboost-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev
sudo apt-get install openjdk-6-jdk
sudo apt-get install libprotobuf-java
Building RCFProto Java bindings
- From the root directory of the distribution, run cmake to generate the makefile:
- Run make:
make
- The java/bin/x86 or java/bin/x64 directory should now contain libRCFProto_Java_impl.so, and java/bin should contain RCFProto.jar .
mkdir make
cd make
cmake -G "Unix Makefiles" ..
Building the Java demo server and client
- From the root directory of the distribution, cd to the demo directory:
- Generate source code for Protocol Buffer messages:
- Create directory for class files:
- Build demo server and demo client (the following command assumes the Protocol Buffers Java library is installed to /usr/share/java/protobuf.jar):
cd java\demo
protoc Demo.proto --java_out=.
mkdir class
javac -classpath ../bin/RCFProto.jar:/usr/share/java/protobuf.jar -d class DemoServer.java DemoClient.java Proto.java DllPathResolver.java
Running the Java demo server and client
- Cd to the class directory where the demo server and client have been built to:
- Run the demo server:
- Run the demo client (in a different command prompt):
cd class
java DemoServer
java DemoClient