Could not find or load main class test.Test
<pre><code>package test;

import java.sql.*;
import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        try{
            Scanner sc = new Scanner(System.in);
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost/database", "root", "root");
            Statement stmt = (Statement) con.createStatement();
            System.out.print("Enter name to search");
            String name = sc.next();
            String query = "SELECT * FROM Contacts WHERE first_name = '" + name + "' ;";
            ResultSet rs = stmt.executeQuery(query);

            while(rs.next()){
                System.out.println("Last_Name: " + rs.getString("last_name"));
                System.out.println("First_Name: " + rs.getString("first_name"));
                System.out.println("Email: " + rs.getString("email"));
                System.out.println("Phone: " + rs.getString("mobile_phone"));

            }
        } catch(Exception e){
            System.out.println("ERROR: " + e.
     }
</code></pre>

<p>I imported jdbc.jar into the project library and still getting the error:</p>

<pre class="lang-none prettyprint-override"><code>Could not find or load main class test.Test
</code></pre>
