The SCTP API is defined in the com.sun.nio.sctp package and is built into rt.jar, therefore it is available on all OpenJDK supported platforms. Code completion, API documentation, etc, should work in your favorite editor. However, the implementation only provides support on Solaris and Linux. So you can use platforms like Windows to develop your SCTP applications, but you must deploy on Solaris or Linux.

Getting Setup

First you must have a JDK with the SCTP API and implementation. You can build you own from the source, or you can grab the latest binaries.

Solaris ships with native support for SCTP since Soalris 10. So if you are running on Solaris 10 or greater, then once you got a JDK with SCTP you are good to go.

On Linux it is preferred to run a recent 2.6 kernel with SCTP support (most kernels in the main distros have this by default). Additionally, you will need to get the LKSCTP package that provides user level access to additional SCTP specific functionality. Example:

Fedora 10: sudo yum install lksctp-tools-1.0.9-1.fc10   or

Ubuntu: sudo apt-get install lksctp-tools

Running a simple SCTP application

To ensure that you have a correctly configured machine and JDK, try compiling and running the following application:

    public class TestSCTP
        public static void main(String[] args) throws Exception {
            com.sun.nio.sctp.SctpChannel sc = com.sun.nio.sctp.SctpChannel.open();
    $ jdk1.7.0/bin/javac TestSCTP.java
    $ jdk1.7.0/bin/java TestSCTP

If it compiles and runs without any errors, then congratulations you have a correctly configured machine and JDK. You can now start writing applications that use the SCTP API.