ho scaricato connector /j poi ho copiato il file .jar nela cartella ext come dice nelle istruzioni

"copying the .jar file to $JAVA_HOME/jre/lib/ext" ma ora non so come procedere il .jar contiene i driver giusto ?

ho provato questo script che ho trovato dopo le istruzioni per l'installazione ma mi da questo errore

Example 3.1. Registering the Driver With the DriverManager

The following section of Java code shows how you might register MySQL Connector/J from the main() method of your application.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

// Notice, do not import com.mysql.jdbc.*
// or you will have problems!

public class LoadDriver {
public static void main(String[] args) {
try {
// The newInstance() call is a work around for some
// broken Java implementations

Class.forName("com.mysql.jdbc.Driver").newInstance ();
} catch (Exception ex) {
// handle the error
}
}

mysql/LoadDriver.java [14:1] cannot resolve symbol
symbol : method forName (java.lang.String)
location: class Class
Class.forName("com.mysql.jdbc.Driver").newInstance ();
^
please help. grazie