You need to get the SQL Server JAR from somewhere, then this is the basic setup:
Code:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // this statically initialises the driver.
String url = "jdbc:microsoft:sqlserver://<host>:<port>;DatabaseName=<databasename>";
String username = "sa";
String password = "yourpassword"
Connection c = DriverManager.getConnection(this.url, username, password);
That should do it for you...