Introducing into eclipse jar package items (and into a reference library as web-inf / and the difference between the two methods at lib)

Article Directory
Note: compile java code used in the jar can be used as a reference library, if it is part of the framework of the non-java code used in the jar must be placed in the WEB-INF lib directory
will be packaged into the Libraries jar package for later use
in the project used in this jar package - as a reference library
to use the jar package in the project - placed under WEB-INF / lib directory
Note: compiling java code used jar library can be incorporated, if it is part of the frame with a non java code to the jar must be placed in the WEB-INF lib directory
because only user libraries in the classpath at compile time, there is no time to deploy.

Packetizing into a jar for later use Libraries
jar package into a path will need to hibernate jar package requires an example:
the need to hibernate jar package placed in the hibernate-core folder, then the folder H jar put under the directory of the disk.
Open eclipse: window-preferences-Java- Build Path-User Libraries-new, as shown below:

 

 

Enter the new user libraries name, the name as long as they can recognize up to, for example, I am here to call it hibernate-core

 

Select just the new libraries, select add external jars on the right path to find just put the jar package, select the package and open the jar


apply and close

Use the jar package in the project - as a reference library
right of the project - (bottom) properties-Java Build Path-add Library ... -User jar package -finish-apply and close Library- check required

 

Select the User Library and then select the next package and then apply what you want

Use the jar package in the project - placed under WEB-INF / lib directory
is still the right project -properties
then locate the deployment assembly:


Finally, apply and close to
----------------
Disclaimer: This article is the original article CSDN bloggers "yogima", and follow CC 4.0 BY-SA copyright agreements, please attach a reprint the original source link and this statement.
Original link: https: //blog.csdn.net/yogima/article/details/81186092

Published 74 original articles · won praise 337 · Views 1.3 million +

Guess you like

Origin blog.csdn.net/kebu12345678/article/details/104762640