What are the type of drivers for Communication with Java?
In order to connect the Java application with the database you need the connector. You need to the mysql-connector.jar to connect the application with mysql database. It need to add both for standalone as well as for web application. 
You can download the .jar file from here.
https://dev.mysql.com/downloads/connector/j/3.1.html