Here is my .sh
JAVA_HOME=./jdk8
JAVA_OPTS="-Duser.timezone=GMT+8 -server -Xms124m -Xmx2048m -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:./gc.log -XX:+HeapDumpOnOutOfMemoryError"
APP_LOG=./logs
APP_HOME=./
APP_MAIN=com.xxx.xxx
........
for i in ./lib/*.*; do
CLASSPATH="$CLASSPATH":"$i"
done
PD=0
........
nohup $JAVA_HOME/bin/java $JAVA_OPTS -classpath $CLASSPATH $APP_MAIN >> $APP_LOG/nohup.log 2>>$APP_LOG/e.log &
I use IDEA to package my project, and I put the output file in the correct location(lib folder). However, when I execute this sh file, I found the error message in the log file.
A JNI error has occurred, please check your installation and try it again.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler
I want to know what I did wrong? Shouldn't I package my project in this way?