How idea2019 adding third-party jar package in the project WEB

1 Create your WEB project
Here Insert Picture Description
2 Select Create Project WEB
Here Insert Picture Description
3 WEB project to your name, pay attention to your saved position
Here Insert Picture Description
4 to create a lib directory for storing your jar package, IDEA can only create a lib directory manually
Here Insert Picture Description
5 to find a jar package I have here with MySQL8 driver package, for example, copy it to your lib directory
Here Insert Picture Description
6 after copying, pasting in lib can Ctrl + v
Here Insert Picture Description

7 This time only copied, not build it. Choose to build your jar packets to your web project
right mouse button here
Here Insert Picture Description
this selection Module Library on the WEB is independent of your current project created
because you build just the beginning of the WEB project selection is to create WEB project under Module
(if select Project) is your entire Project share.
Here Insert Picture Description
8 to write a simple program to test JAR you just imported are available.
Here Insert Picture Description

Published 109 original articles · won praise 56 · views 5697

Guess you like

Origin blog.csdn.net/zhang6132326/article/details/104795258