Home java How to create a jar archive using (c) Intellij Idea?

How to create a jar archive using (c) Intellij Idea?

Author

Date

Category

I can not create Create an executable archive JAR. How did I understand this problem should be solved with the help of Terminal, but it does not work with me (I can not enter the text, just like printing there, so and paste the copied text there). How to use when compiling flags. Also where to type the command to create a jar archive?


Answer 1, Authority 100%

In the idea, first go to File | Project Structure | Artifacts , there create a new artifact , jar – & gt; From Modules with Dependencies

then build | Build Artifacts


Answer 2, Authority 50%

In a good way you have to have an assembly system that herself does it. The most famous is Maven , GRADLE and ant . In addition to the simple compilation in War / Jar, these systems are able to still many useful pieces, including the directory from intermediate files, correct the files at the time of compilation, run tests and much more.
After that, it is enough to add tasks in Run Configurations , and the IDEa itself will be concerned about calling console commands, it will only remain to run the desired configurations.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions