Idea cannot resolve java.sql.* symbol,notice cannot import

by xiaomax   Last Updated May 16, 2019 06:26 AM

the idea cannot resolve java.sql.* symbole,below is i find problem.i install jdk with 1.8.0_181.

i have already tried using below actions. file->invalidate cache /restart,But the problem still exists

it is said the unused import

the rt.jar package in idea explorer,the jdk path is C:\Program Files\Java\jdk1.8.0_181\jre\lib

the rt.jar package in winrar explorer, the jdk path is C:\Program Files\Java\jdk1.8.0_181\jre\lib

Tags : import package


Answers 1


You need to add mysql dependency to your project. If you are using the maven project, gradle ,sbt use this link and add it into your project.

https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.12

If you are not using any of this above download mysql-connector-java jar manually and add it in class path. you can download jar from here https://www.mysql.com/products/connector/

Dinesh Krishnan
Dinesh Krishnan
May 16, 2019 06:26 AM

Related Questions


Updated December 19, 2017 08:26 AM

Updated June 27, 2015 16:11 PM

Updated September 14, 2017 09:26 AM

Updated August 25, 2017 05:26 AM

Updated May 06, 2019 08:26 AM