Putting anything in default Java installation directory is bad idea. If you creating just simple application you can keep JAR file in same directory as your source code for easy compiling. However while working on something larger you should set up special folder for any external resources ("lib") and either manage linking to your project through IDE or with Ant or Maven configuration files (which IDE basically does for you on background).
Your mistake as already pointed was in use of incorrect connection string that should be
//Pseudo code
jdbc:mysql://<HOST>:<PORT>/<DB>
//Example code
jdbc:mysql://localhost/danijsptutorial
//or with port number if database uses other then default port
jdbc:mysql://localhost:3306/danijsptutorial
Examples of connection string for other databases can be found here