how can I import mysql-connector-java-5.1.40-bin.jar file to IntelliJ? I was searching about hour but I cant find nothing.
Asked
Active
Viewed 4,170 times
0
-
2This question is a duplicate of [How to add external library in IntelliJ IDEA?](http://stackoverflow.com/questions/7065402/how-to-add-external-library-in-intellij-idea), it have nothing in common with [PHP: “Notice: Undefined variable” and “Notice: Undefined index”](http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index). – DimaSan Nov 07 '16 at 09:22
1 Answers
5
If you use Gradle:
Just add this line to build.gradle within dependencies { ... }
:
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.11'
If you use Maven:
Add these lines:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
If you want to add it without using any build automation systems:
Just drag & drop it to your project and right-click it and choose Add jar as library...

Defozo
- 2,946
- 6
- 32
- 51