"C:\Program Files\Java\jdk1.8.0_112\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_112\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_112\jre\lib\rt.jar;E:\git\mavenjfinal\target\classes;E:\maven\local_repo\com\jfinal\jfinal\3.0\jfinal-3.0.jar;E:\maven\local_repo\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;E:\maven\local_repo\com\jfinal\jetty-server\8.1.8\jetty-server-8.1.8.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-util\8.1.8.v20121106\jetty-util-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-servlet\8.1.8.v20121106\jetty-servlet-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-security\8.1.8.v20121106\jetty-security-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-server\8.1.8.v20121106\jetty-server-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-continuation\8.1.8.v20121106\jetty-continuation-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-http\8.1.8.v20121106\jetty-http-8.1.8.v20121106.jar;E:\maven\local_repo\org\eclipse\jetty\jetty-io\8.1.8.v20121106\jetty-io-8.1.8.v20121106.jar;D:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain config.AppConfig
Starting JFinal 3.0
Starting web server on port: 8001
2017-03-10 16:09:33.880:WARN:oejuc.AbstractLifeCycle:FAILED o.e.j.w.WebAppContext{/,file:/E:/git/mavenjfinal/src/main/webapp/}: java.lang.NoClassDefFoundError: org/eclipse/jetty/xml/XmlParser
java.lang.NoClassDefFoundError: org/eclipse/jetty/xml/XmlParser
at org.eclipse.jetty.webapp.WebDescriptor.newParser(WebDescriptor.java:70)
at org.eclipse.jetty.webapp.WebDescriptor.ensureParser(WebDescriptor.java:61)
at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:59)
at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:148)
at org.eclipse.jetty.webapp.MetaData.setDefaults(MetaData.java:149)
at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:54)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:455)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServerForIDEA.doStart(JettyServerForIDEA.java:133)
at com.jfinal.server.JettyServerForIDEA.start(JettyServerForIDEA.java:72)
at com.jfinal.core.JFinal.start(JFinal.java:171)
at config.AppConfig.main(AppConfig.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by:
java.lang.ClassNotFoundException: org.eclipse.jetty.xml.XmlParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.webapp.WebDescriptor.newParser(WebDescriptor.java:70)
at org.eclipse.jetty.webapp.WebDescriptor.ensureParser(WebDescriptor.java:61)
at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:59)
at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:148)
at org.eclipse.jetty.webapp.MetaData.setDefaults(MetaData.java:149)
at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:54)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:455)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:277)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.jfinal.server.JettyServerForIDEA.doStart(JettyServerForIDEA.java:133)
at com.jfinal.server.JettyServerForIDEA.start(JettyServerForIDEA.java:72)
at com.jfinal.core.JFinal.start(JFinal.java:171)
at config.AppConfig.main(AppConfig.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
1:下载首页右侧的 jfinal demo,根据喜好,可以下载 maven 版与普通 java web 版
2:直接导入到 eclipse 或 idea 中
3:创建好数据库,运行一下 DemoConfig 中的 main 方法
注意:第三步中的 main 方法启动时,如果是 idea ,需要使用注释掉的,那个没有第三个参数的方法