How to create a .jar using IntelliJ IDEA 14.1.5:

File > Save All.
Run driver or class with main method.
File > Project Structure.
Select Tab "Artifacts".
Click green plus button near top of window.
Select JAR from Add drop down menu. Select "From modules with dependencies"
Select main class.

این قسمتش غلطه باید کپی را بزنی
The radio button should be selecting "extract to the target JAR." Press OK.
Check the box "Build on make"
Press apply and OK.
From the main menu, select the build dropdown.
Select the option build artifacts.






I had this problem when using IntelliJ IDEA 14.01.

I was able to fix it by:

File->Project Structure->Add New (Artifacts)->jar->From Modules With Dependencies on the Create Jar From Module Window:

Select you main class

JAR File from Libraries Select copy to the output directory and link via manifest