Compiling the Java bindings from source


Warning

Compiling the Java bindings are not an easy task, because we use Swig and JNI.

We use C++ for the Java bindings, so you must already know how to use the C++ SDK.

If you still want to try, here’s how to do it:

Install the C++ SDK and qiBuild

Install the Java SDK

  • Windows: get the Java JDK from Oracle’s website.
  • Mac: simply type java and let Apple install Java for you.
  • Linux: install the JDK packaged by your distribution.

Install Swig

Linux:

sudo apt-get install swig

Mac:

Depending on your version, swig may be already installed, if not, you can still compile it from source

Windows:

Get the swig zip from the SWIG website, extract it and make sure swig.exe is in your %PATH%

Compiling the jnaoqi native library

You can then compile jnaoqi as any qiBuild C++ project.
For further details, see: Using qiBuild with Aldebaran packages.

During the build some java files will be generated in:

java/src/

Compiling the Java code

Then you can compile the Java code with:

javac com/aldebaran/proxy/\*.java