Java+MySql
Posted by: Gabriel Burceanu
Date: September 23, 2006 04:12PM

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/

How can I make it work ?

Options: ReplyQuote


Subject
Written By
Posted
Java+MySql
September 23, 2006 04:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.