I'm trying to connect to db2 but I keep getting errors.

I have db2 installed on a windows 7 user account called "db2admin"
The database I'm trying to connect to is called "db2database"
The username and password for that account is: db2/db2

This is my code:

try 
{
Class.forName("com.ibm.db2.jcc.DB2Driver");

Connection con = 
DriverManager.getConnection("jdbc:db2://localhost:50250/db2database");
}
catch(Throwable e){
System.out.println("error");
}

Can someone take a look?

Thank you

Never mind, I figured it out :p