jdbc.SQLServerException: Login failed for user for any user

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;");

Having been through this very recently the steps I took to solve pretty much the same problem were

  1. use SQL Server Management Studio to log in with the desired account and confirm access to read (and write if necessary)
  2. Use SQL Server Configuration Manager to confirm that the server instance is listening on the IP address being targetted
  3. Disable the firewall to check that isn't getting in the way (and add an exception if necessary for future use)

The absolute kicker for me was understanding what IP addresses and ports the instance was set to listen on so that when I constructed the connection string the connection wasn't being rejected.

Also, if you want to connect using Windows logins you need to ensure the SQL instance is configured for mixed mode authentication (i.e. to allow Windows and SQL logins)