很简单……
打包的时候,在MANIFEST中加入一个.

Manifest-Version: 1.0
Class-Path: . commons-collections4-4.1.jar xmlbeans-2.6.0.jar objenesi
 s-2.1.jar jconsole.jar jackson-core-2.5.3.jar commons-pool2-2.3.jar j
 etty-io-8.1.8.v20121106.jar poi-ooxml-3.16.jar shiro-web-1.2.4.jar qu
 artz-2.2.3.jar cglib-nodep-3.1.jar core-3.2.1.jar fastjson-1.2.6.jar 
 stax-api-1.0.1.jar commons-codec-1.10.jar javassist-3.19.0-GA.jar log
 4j-1.2.17.jar jetty-xml-8.1.8.v20121106.jar poi-ooxml-schemas-3.16.ja
 rquartz-jobs-2.2.3.jar jetty-webapp-8.1.8.v20121106.jar javax.servlet
 -3.0.0.v201112011016.jar tools.jar jcommander-1.48.jar jfinal-weixin-
 1.8.jar commons-beanutils-1.8.3.jar javase-3.2.1.jar jetty-util-8.1.8
 .v20121106.jar poi-3.16.jar jedis-2.7.2.jar mysql-connector-java-5.1.
 39.jar curvesapi-1.04.jar slf4j-api-1.6.4.jar shiro-core-1.2.4.jar gu
 ava-19.0.jar jetty-security-8.1.8.v20121106.jar cos-26Dec2008.jar c3p
 0-0.9.1.1.jar commons-logging-1.2.jar freemarker-2.3.16.jar slf4j-jdk
 14-1.6.4.jar jetty-continuation-8.1.8.v20121106.jar jetty-http-8.1.8.
 v20121106.jar fst-2.29.jar druid-1.0.18.jar jetty-server-8.1.8.v20121
 106.jar jetty-servlet-8.1.8.v20121106.jar jfinal-2.2.jar
Main-Class: com.cnvp.wbms.application

仅仅知道解决方法,不知道原理,如果有路过大神明白,请赐教


MichaelZ
374 声望13 粉丝

web全栈工程师