Java library for interfacing with the OpenSplice DDS implementation

Source code and compiled library coming soon! Right now this documentation serves more as a teaser rather than an actual usage guide.


  • OpenSplice
  • JDK (fairly new, but anything newer than java 5 should work).
  • A gnu/linux distribution. Tested on:
    • Arch Linux (kernel version 4.15.3) with OpenSplice Community Edition (linux x64)
    • Ubuntu 17.10 with OpenSplice Evalutation Version (linux x64)
    • Debian Stretch with OpenSplice Evaluation Version (armv7, BeagleBone Black)

Other distro-OpenSplice combinations might work too, but they haven't been tested for compaitibility.

Always run . $OSPL_HOME/ before compiling or running the application in the terminal you're using on all platforms. (You might need to export $OSPL_HOME yourself before being able to do that).


  1. Build only - make or make compile
  2. Example application - make run This will compile and start the example application.
  3. Library - make package This will compile the library and place it into the lib/ folder. A pre-built version is already in there, but you might want to consider rebuilding it if you encounter any problems.

Using the library

For a simple implementation look at the project in the standalone_project folder. It is a CLI messaging application that uses this library (and hence the OpenSplice DDS implementation) to communicate.

  • For both Compiling and Running

    • Run from inside your OpenSplice installation folder
    . ./path/to/
  • Add to classpath: $OSPL_HOME/jar/dcpssaj5.jar, lib/

  • Both Subscription and Publishing

  • Import*,*,*

    • Initialize the Service Environment: DDSLib.init();

    • Create a Topic1: Topics exampleTopic = new Topics("exPart", "exTopic");

  • Only Subscription

    • Create a Listener class:

        public class MyListener implements SubscriptionListener{
            public void gotMessage(String topic, String event, String params)
                //Thing to do when a message arrives
    • Instantiate the above mentioned Listener class:

          MyListener myListener = new MyListener();
    • Register the Listener instance:

    • Don't forget to unregister & close

  • Only publishing

    • Publish & wait for transmission (optional)

          exampleTopic.publishEvent("exEvent1", "exParams1");
          }catch(Exception e)
    • close topic


Important: you need to create a Topics instance for both the receiving and the transmitting parties!


The example sources are in src/hu/bme/mit/gamma/ddslib, and consist of, the main source file and, an implementation of the SubscriptionListener.

1: for other options, open src/hu/bme/mit/gamma/ddslib/opensplice/, and look at its constructors.