For MS-Access connection,
-- First you have to register DSN and make username and password there.
-- After that link the database of your application to that DSN.
-- In the connection statement, mention as
connection myconn = DriverManager.getConnection("jdbc:odbc:DSNname","username","password");
---KKK Guptha