As the error says, you'll need to set java.library.path to the directory where the cplex1280.dylib shared library is located.
When you install CPLEX Optimization Studio there are examples and a Makefile that will show you exactly what you need to use on the command line. You can run the examples, like so (where <COSDIR> is the directory where CPLEX Optimization Studio is installed):
cd <COSDIR>/cplex/examples/x86-64_osx/static_pic
make execute_java
This will compile the examples and execute them.
On Linux, I see something like this when the LPex1 example is executed:
java -d64 -Djava.library.path=../../../bin/x86-64_linux -classpath ../../../lib/cplex.jar: LPex1 -r
If you're using an IDE like Eclipse, you'll need to set up your project so that it uses the corresponding options.
#CPLEXOptimizers#DecisionOptimization