Personal blog

www.milovetingting.cn

Intellij-idea Export executable Jar

preface

IntelliJ Idea exports the executable Jar package, as shown in the following table.

Create a Java file and add the main method to it

Configuration Artifacts

File-Project Structure-Project Settings-Artifacts

Click on the +.

Click JAR-From modules with Dependencies…

Choose the Main Class

Click on the Build – Build Artifacts

Click on the Build

As you can see, jars have been generated under the out directory