You must set connection properties before you connect to a server.
Using the DriverManager.getConnection method in your application, or,
Setting the connection properties when you define the URL.
Properties props = new Properties();
props.put("user", "userid");
props.put("password", "user_password");
/*
* If the program is an applet that wants to access
* a server that is not on the same host as the
* web server, then it uses a proxy gateway.
*/
props.put("proxy", "localhost:port");
/*
* Make sure you set connection properties before
* attempting to make a connection. You can also
* set the properties in the URL.
*/
Connection con = DriverManager.getConnection
("jdbc:sybase:Tds:host:port", props);