我使用mysql-connector-java-5.0.7-bin将java与mysql.it连接起来,在IDE中工作良好,最后我创建了可执行文件jar.。当我从cmd窗口运行jar文件时,我在cmd中得到了以下错误db not connected -connectionjava.lang.ClassNotFoundException: com.mysql.
IncludeTag.java:178) at org.apache.jsp.apps.components.navigation.topnavigation_jsp(JspServletWrapper.java:449)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp$100(JspSc
public static **Connection connectToDB()** try Class.forName("com.mysql.jdbc.Driver").newInstance();
return DriverManager.getConnection("jdbc:mysql://localhost:3306/payrollMultiple annotations found at th