There is an online JDBC tutorial here.
You can get jConnect from Sybase for a free evaluation. I installed a copy at /afs/eos.ncsu.edu/info/csc/csc432_info/LEC/sybase/install, which you should be able to use by setting the environment variables as described below.
Here are some steps to execute JDBC programs for accessing Sybase. The first set of instructions is all you need to get to a database, but you might play with the next few options as well.
% add jconnect % setenv LOGIN you % setenv PASSWORD your-sybase-password
javac SKRSample.java java SKRSample -u $LOGIN -p $PASSWORD
The above works for me; you will need to modify the Java source or create a table called Staff with an int field called salary.
java IsqlApp -U $LOGIN -P $PASSWORD -S jdbc:sybase:Tds:remus.csc.ncsu.edu:4000
% java sample.SybSample ReadCursor -U $LOGIN -P $PASSWORD -S jdbc:sybase:Tds:remus.csc.ncsu.edu:4000 &
% java sample.SybSample IsqlApp -U $LOGIN -P $PASSWORD -S jdbc:sybase:Tds:remus.csc.ncsu.edu:4000 &