What is wrong with the code there are lots of error while debugging. I am writing a code for a singleton class to connect with the database mysql.
Here is my code
The exception can also occur because of the class path not being defined.
After hours of research and literally going through hundreds of pages, the problem was that the class path of the library was not defined.
Set the class path as follows in your windows machine
set classpath=path\to\your\jdbc\jar\file;.