0

How do I install com.mysql.jdbc.Driver for Fedora17 O.S using jdk version 1.7 I always get an error of could not find Driver with class name:com.mysql.jdbc.Driver in all my jdbc codes.

user3874048
  • 1
  • 1
  • 5

1 Answers1

-1

Assuming that you already have MySQL installed,

  1. Install the connector driver. : yum install libmysql-java

  2. Then make sure that the classpath is set.

    export CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.jar

    If you want to set this for all users, you should modify the /etc/environment instead

If you are using Eclipse, you can also do this by going through the following steps:

  • Select Project Properties > Java Build Path
  • Select Libries tab
  • Click Add External Jars
  • Choose the jar file, in this case mysql-connector-java.jar
Community
  • 1
  • 1
sudheesh shetty
  • 358
  • 4
  • 14