Do you know why the imported jar package should be placed in the lib folder?

 

For many students who are just starting to learn the web, have you ever had any questions about the lib folder? Why must the jar package be placed under the lib folder? I can’t change the place. In fact, if you are not using a server, there is no problem, but when you use a web server similar to tomcat, then you have to be careful. The jar package importing into the workspace is controlled by us. There will be any space where I guide it. I can’t do it if I don’t guide it. Yes, the compiler will automatically search for the jar package it needs, but the server will not only go to it. Look for the jar packages in the lib folder and copy them to the server (that is, in the lib folder of your server’s current project). You can’t control this. So when I first came into contact with the framework, I encountered a problem. There is no problem with the jar package in eclipse, but the server reports an error. It turns out that there is an additional jar package under the lib folder. I did not import the workspace of the project, but the server copied it to the server, then the jar package may be If there is a problem, if it has a dependent package, the server will report an error if it does not. Therefore, it is best for everyone to develop a good habit. The jar package only guides the useful ones, and don't put the useless ones under the lib even if you don't use it. Develop a good habit and write standardized code.

Original: https://blog.csdn.net/DAVE_JAVA/article/details/52588755?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-5.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog- BlogCommendFromMachineLearnPai2-5.channel_param

 

Guess you like

Origin blog.csdn.net/cherry_vicent/article/details/108071524