This does not work for you?
Connection connection = DriverManager.getConnection(url, username, password);
with the URL being something like:
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber
+ ":" + sid;
expect of course with the string needed for sybase (as I am using oracle).