[JAVA] idea mac Jar package build method and Maven method

Uncle Cthulhu 2022-11-24 21:24:49 阅读数:183


1. Build method

1. Open Project Structure

2. Settings

a): Select the class where the corresponding Main method is located;

b): A Jar, or copy other Jar packages into the same folder ()

c): Note ️: You must choose to change the directory, as shown below

3. Tick

4. Build---Build Artifacts

5. The finished Jar package is in the outDirectory of the third step

Second, Maven method

1. Add pom.xml


2. Clean first, then pack

copyright:author[Uncle Cthulhu],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/328/202211242120378515.html