Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 915
Петр Аношкин Avatar asked Oct 12 '25 09:10

Петр Аношкин


1 Answers

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.

like image 68
adxl Avatar answered Oct 15 '25 00:10

adxl