CONNECT is a DBISQL specific command, not a general database statement. To connect using JDBC you use the getConnection() method. You can find an example in the SQL Anywhere documentation here:
http://dcx.sybase.com/index.html#sa160/en/dbprogramming/connecting-establishing-jdbc.html