Using the host name of your other machine (String hostName) and the database name (String databaseName), your URL will take the form (using postgres on port 5432 as an example):
"jdbc
ostgresql://"+hostName+":5432/"+databaseName
Your other machine's database must be configured to accept external users, and you may need to supply username and password using:
DriverManager.getConnection(String url,
String user,
String password)
tangleb1