0

when i try to run a project

java -jar test.jar    

i get the following exception

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver                    
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

how to add mysql-connector-java-5.1.22-bin.jar in classpath

0

2 Answers 2

1

Maybe you have forget to add the library in your project. Please see the links below

Sign up to request clarification or add additional context in comments.

1 Comment

how to add library (.jar) to the project??
1

You should be having jdbc driver classes in your classpath.

1 Comment

Akash, This link will help you. Adding Classes to the JAR File's Classpath

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.