# Установка jssc

1. Скачать последнюю версию: http://code.google.com/p/java-simple-serial-connector/downloads/list

2. Извлечь из архива файл `jssc.jar` и положить в `jroboplc/jar/libex`

# Проблемы версии 2.5.0

Проявляется на Ubuntu 10.04 (x86) (forum):

    java.lang.UnsatisfiedLinkError: /home/denis/.jssc/linux/libjSSC-2.5_x86.so: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.15' not found (required by /home/denis/.jssc/linux/libjSSC-2.5_x86.so)
            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
            at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
            at java.lang.Runtime.load0(Runtime.java:792)
            at java.lang.System.load(System.java:1059)
            at jssc.SerialNativeInterface.<clinit>(SerialNativeInterface.java:159)
            at jssc.SerialPort.<init>(SerialPort.java:113)
            at promauto.jroboplc.plugin.serial.SerialImpl.open(SerialImpl.java:108)
            at promauto.jroboplc.plugin.serial.SerialModule.prepare(SerialModule.java:112)
            at promauto.jroboplc.core.TaskManagerImpl.start(TaskManagerImpl.java:40)
            at promauto.jroboplc.core.cmd.CmdStart.execute(CmdStart.java:28)
            at promauto.jroboplc.core.cmd.CmdDispatcherImpl.execute(CmdDispatcherImpl.java:126)
            at promauto.jroboplc.core.JRoboPLC.executeStartCommands(JRoboPLC.java:133)
            at promauto.jroboplc.core.JRoboPLC.run(JRoboPLC.java:113)
            at promauto.jroboplc.core.JRoboPLC.main(JRoboPLC.java:170)

Решение - перекомпиляция нативной библиотеки libjSSC-2.5_x86.so:

    cd jSSC-2.5.0-Release/src/cpp/_nix_based
    g++ -m32 -O3 -s -I$JAVA_HOME/include -I$JAVA_HOME/include/linux -fPIC jssc.cpp -shared -o libjSSC-2.5_x86.so
    cp libjSSC-2.5_x86.so /home/user/.jssc/linux/libjSSC-2.5_x86.so