简体   繁体   中英

How do I make an executable file from an intellij idea project?

I created a gradle project in Intellij idea. After building and running everything worked as expected. But I don't want to run an IDE everytime I need to use my program. Can anyone recommend a step-by- step guide?

You can quickly do it in IntelliJ following theses steps :

  • Go to File > Project Structure
  • Select Artifacts tab and click on the "+" icon
  • Choose to generate a JAR from modules with dependencies
  • Choose your module and its main class and save changes
  • Now go to Build > build artifacts > build*

It's done, your executable .jar file should be located in out/artifacts/module_name/module.jar

* Choose rebuild if it has already been built.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM