How to import the jar package in the java project:
Method 1:
1. Create a new folder lib in the java project and add Copy the jar package that needs to be imported to the lib folder
2. Select servlet-api.jar, right-click "Build Path"---->"Add to Build Path "After that, the jar package has been successfully added to the java project. At this time, there is an additional Referenced Libraries library in your java project, which contains the successfully added servlet-api.jar package
3. Right-click the java project name and click "Build Path" - --->"Configure Build Path"----->"Java Build Path"----->After "Libraries", you can find an additional servlet-api.jar in the pop-up properties window Library
Method 2:
1. Create a new folder lib in the java project, and copy the jar package that needs to be imported into the lib folder
2. Right-click the java project name and click "Build Path"---->"Configure Build Path"----->"Java Build Path"----- >After "Libraries", click "Add JARS" in the pop-up properties window, select servlet-api.jar in the pop-up JAR Selection window, click 'OK' to return to the properties window and click "ok" to achieve the same result. Method 1 has the same effect.
For more java knowledge, please pay attention to the java basic tutorial column.
The above is the detailed content of How to import jar package in java project. For more information, please follow other related articles on the PHP Chinese website!