java - diffrence between adding jars files in lib folder and setting it in classpath -


could please explain difference in addng jars in lib folder , adding jars classpath .

are both way add jars(anyone work) or there difference ? tried searching couldn't find answer.

if have web application project bundles war, adding jar files web-inf/lib automatically put these jar in classpath of application when being deployed in servlet container (jetty, tomcat) or in application server (glassfish, wildfly). note these libraries available single application being deployed, not other app deployed in server.

if have simple jar lib folder inside it, adding jar folder nothing. jar files must executed on own, need specify libraries use in classpath, otherwise jar not run. case, better have libraries inside lib filder outside jar, reference them in manifest file. on other hand, may use maven generate fat jar.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -