I want to try some online game using only a database.The game will probably be turned based.Anyway … I want to connect to a mysql database from an J2SE application that runs on the user’s computer.
When I try to connect to the database with :
public static void connectToDatabase()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
}
catch (ClassNotFoundException e)
{
System.err.println("Class not Found : "+ e);
System.exit(1);
}
try
{
con=DriverManager.getConnection("jdbc:mysql://db1.xhost.ro/bloodrain_xhost_ro",User,Password);
}
catch(SQLException e)
{
System.err.println("SQL Exception : "+ e);
System.exit(1);
}
}
I get the following exception :
http://bloodrain.xhost.ro/exception.jpg
How can I make it work ? ???