且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

类路径,日食和java.lang.ClassNotFoundException:com.mysql.jdbc.Driver

更新时间:2023-01-16 08:23:02

因此,如果您在内置的tomcat下运行它:您可以转到工作空间文件夹(eclipseworkspace文件夹),其中将存在.metadata.plugins文件夹\ org.eclipse.wst.server.core \ tmp0(或tmp1,2-取决于您的环境)/wtpwebapps//WEB-INF/lib-应将应用程序的所有jar放在此处.如果没有,请尝试手动放置(但这是最糟糕的方法)

so if you are running it under built-in tomcat: you can go to your workspace folder (eclipse workspace folder), there will be folder .metadata.plugins\org.eclipse.wst.server.core\tmp0 (or tmp1,2 - depends on your environment)/wtpwebapps//WEB-INF/lib - here should be located all the jars of your app. If no - try to put it manually (but it's a worst way)

将其添加到tomcat lib文件夹-尝试找到它?当您在Eclipse中创建Server时,它应该询问您有关tomcat的安装文件夹?否则它可能会建议您下载它..所以只需下载/查找它,然后放在这个罐子里

to add it to tomcat lib folder - try to find it? when you create Server in the eclipse it should ask you about installation folder of your tomcat? or it can suggest download it.. so just download/find it, and put there this jar

ps:恐怕您需要阅读很多东西,例如,需要能够从命令行运行tomcat,以便更好地了解所有过程以及那里的工作方式.

ps: I afraid you need to read a lot of stuff, you need to be able run your tomcat from command line for example, to better understand all the process and how all is working there.