I trying to test the connection with my local sql DB. I have this code:
try{ Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\").newInstance(
If you try to connect with database which is using windows authentication, you can use 'integratedSecurity' option in your connection string.
DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=SocialFamilyTree;integratedSecurity=true;");