Why do you sometimes need to add JARs to your build path, and sometimes not?

I develop in Eclipse, and from time to time I have to add JAR to WEB-INF \ lib. My question is why sometimes I need to add them to the build path, and sometimes I can just dump them there.

+3
source share
3 answers

If you need them at compile time, they should be in the build path. If you only need them at runtime, just add them to WEB-INF \ lib.

+8
source

, - . , . , WEB-INF/lib.

+1

... Eclipse. :

  • Eclipse JEE?
  • -?

"" , , WEB-INF\lib (, Eclipse). Dynamic Web Project .

If you still have a problem, I think there is a problem with your Eclipse or your configuration.

From here (http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html):

/Library

Supported JAR files that link to your web application. Any classes in .jar files placed in this directory will be available for your web application.

0
source

Source: https://habr.com/ru/post/1793981/


All Articles