idea export executable jar package

The following takes the hello world program as an example to illustrate the packaging process.

Artifacts Config

File -> Project Structure -> Artifacts -> + -> From modules …

img

img

Build Artifacts

Build -> Build Artifacts

img

img

important point

If the project structure does not correspond, the main file cannot be found, and the path needs to be adjusted manually.

Such as maven project.

The following two pictures are from the Internet

before fixing

img

after modification

img

reference

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325568231&siteId=291194637