JDBC stands for Java DataBase Connectivity. JDBC is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases. By using JDBC, a Java application can access any kind of tabular data, especially data stored in a Relational Database. JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
By following the steps users can run SQL commands with java. The most common error that arises when using JDBC in cmd is Java.lang.ClassNotFoundException: com.mysql.jdbc.driver or no suitable driver found for jdbc:mysql://localhost/. By following the below steps you can tackle these errors.
Follow the steps below to set up JDBC in the latest JDK.
Extract the zip file and copy the mysql-connector-java.jar
Go to the installation directory of Java. C:\ProgramFiles\Java\jdk-14.0.2\ Create a folder named ext and paste mysql-connector-java.jar in that folder.
Comments
Loading…
Loading…