I have a mapped drive on my PC to a server in our server room. I set up my DSN file so that it uses the mapped drive to get to the DB and then I just connect to the DB using the DSN name in the Java program. I hope this helps!
Below, BCMSDB is the USER DSN that I setup in NT

DBC Connection Data Sources! It contains the information about the mapping.