IDEA generates executable jar (including external dependencies)

1、File->ProjectStruct->Artificats

2. Select your own module and main class and click ok

3. Complete the following operations

4. Build->BuildArtifacts->build starts to build jar

5. Finally, under the path specified in the screenshot in 3, you can see the generated jar

6. Supplement:

The problem that can be solved: java.lang.NoClassDefFoundError is reported when the jar is executed

Guess you like

Origin blog.csdn.net/CSDN_WHB/article/details/129341748