The FEC package will attempt to deploy native libraries for your OS by default, if you do NOT want it to deploy the native libraries and instead force it to use the pure Java libraries, you must set the folloing property:

com.swarmcast.fec.keys=pure8,pure16

Example of how to use this stuff for encoding/decoding blocks of data from
disk.  If you are using this for communications then proceedure will be
different, but this should give you the general idea.  The Buffer
class is found in the Swarmcast common library (common.jar).

import com.swarmcast.fec.*;
import com.swarmcast.util.Buffer;

...

FECCode code = FECCodeFactory().getDefault().createFECCode(k,n);

RandomAccessFile raf = new RandomAccessFile(f,mode);

// Create the byte[] to hold everything
byte[] b = new byte[k*packetSize];

// Create user-friendly Buffers to wrap b.
Buffer[] bufs = new Buffer[k];
for (int i=0;i<k;i++) {
    bufs[i] = new Buffer(b,i*packetSize,packetSize);
}

raf.readFully(b);  // read in a block of data to decode (32 kilobytes?)

// get the indexes of the packets on disk, this is just a hand-waving
// example of how you might get this data.  See
// com.swarmcast.fec.io.PacketPlacement for a concrete example of how
// one might do this.
int[] indexes = metaData.getIndexes(); 

code.decode(bufs,indexes);

// Write the decoded data back to disk.
raf.seek(0);
raf.write(b);
