Error while trying to use Mysql for my Java program
<p>I got this error while trying to compile the below code. I suspect that the code is not support MySQL. I want to use MySQL and try to modify it, but it cannot compile.</p>

<pre><code>QuadrantSystemRDB.java:183: cannot find symbol
symbol  : variable driverName
location:class edu.indiana.iucbrf.examples.quadrantRDBTemplate.QuadrantSystemRD
B
        dbInfo = new DBInfo(new JDBCDriverInfo(driverName, url, username, passwo
rd),constantsTableName);
                                               ^
Note: QuadrantSystemRDB.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
</code></pre>

<p>Code:</p>

<pre><code>    private void setupInfo() {

    Driver driver = new com.mysql.jdbc.Driver();
    String url = "jdbc:mysql://localhost:3306/test";
    String username = "root";
    String password = "123456";

    String problemFeatureSpecTableName = "ProblemFeatureSpec";
    String solutionFeatureSpectTableName = "SolutionFeatureSpec";
    String classTableName = "Class";
    String extraDataTableName = "ExtraData";
    String casebaseTablename = "CaseBase";
    String problemTableName = "Problem";
    String solutionTableName = "Solution";
    String inactiveContextsTableName = "InactiveContext";
    String constantsTableName = "Constants";
    dbInfo = new DBInfo(new JDBCDriverInfo(driverName, url, username, password),constantsTableName);
    problemSpecInfo = new FeatureSpecRDBInfo(problemFeatureSpecTableName, classTableName, extraDataTableName);
    solutionSpecInfo = new FeatureSpecRDBInfo(solutionFeatureSpectTableName, classTableName, extraDataTableName);
    rdbCasebaseInfo = new RDBCaseBaseInfo(casebaseTablename, solutionTableName, problemTableName, inactiveContextsTableName);
}
</code></pre>

<p>Edit:</p>

<p>Here is my echoed classpath--></p>

<p>C:\Documents and Settings\user>echo %classpath%
.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\iucbrf\;C:\mysql-connector-ja
va-5.1.14-bin.jar;C:\iucbrf.jar</p>

<p>Edit 2:</p>

<p>I changed <code>driverName</code>  to <code>driver</code>.
Now the error is...</p>

<pre><code> QuadrantSystemRDB.java:167: unreported exception java.sql.SQLException; must be
 caught or declared to be thrown
            Driver driver = new com.mysql.jdbc.Driver();
                            ^
 Note: QuadrantSystemRDB.java uses unchecked or unsafe operations.
 Note: Recompile with -Xlint:unchecked for details.
 1 error
</code></pre>

<p>edit 3:</p>

<pre><code>try
  {
    Driver driver = new com.mysql.jdbc.Driver();
    String url = "jdbc:mysql://localhost:3306/test";
    String username = "root";
    String password = "123456";

catch (Exception e)
  {
   // message.
  }
</code></pre>
