Another approach could be:
Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, from the main menu, select File | New | Project from Existing Sources.
IntelliJ IDEA 15 & 2016
- File > Project Structure... or press Ctrl + Alt + Shift + S.
- Project Settings > Modules > Dependencies > "+" sign > JARs or directories...
- Select the jar file and click on OK, then click on another OK button to confirm.
- You can view the jar file in the "External Libraries" folder.