import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class DBConnector {
	public static Statement getConnectedStatement() {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			System.err.println("Driver class not found");
			e.printStackTrace();
		}
		Connection con = null;

		try {
			con =
				(Connection) DriverManager.getConnection(
					"jdbc:mysql://dbServerMachine/mcjtest/",
					"user",
					"thePassword");
			return (con.createStatement());
		} catch (SQLException e1) {
			System.err.println("Error establishing database connection");
			e1.printStackTrace();
		}
		//never gets here
		return null;
	}
}
