When I use the below command to import Selenium2Library, and I will get ExceptionInInitializerError
java -jar "$BASEPATH/robotframework.jar" -P $BASEPATH/javalib/robotframework-selenium2library.jar "$@"
And it works when I replace -P with -cp to launch Robotframework:
java -cp $BASEPATH/robotframework.jar:$BASEPATH/javalib/* org.robotframework.RobotFramework "$@"
When I use the below command to import Selenium2Library, and I will get ExceptionInInitializerError java -jar "$BASEPATH/robotframework.jar" -P $BASEPATH/javalib/robotframework-selenium2library.jar "$@"
And it works when I replace -P with -cp to launch Robotframework: java -cp $BASEPATH/robotframework.jar:$BASEPATH/javalib/* org.robotframework.RobotFramework "$@"
It seems a ClassLoader problem.
There's a same problem on Robotframework user group: https://groups.google.com/forum/#!topic/robotframework-users/tJjeZm0JEE0