As long as the database is registered in the ODBC you can configure to any path as long as you have access rights...
Here is a nice little java code snippet that allows you a connection using JDBC-ODBC:
//class database setup
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class JDBCsetup {
public static void JDBCsetup(){
try{
//steps 1 & 2
//DriverManager.registerDriver ( new oracle.jdbc.driver.OracleDriver());
DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
System.out.println("Driver setup here"

;
/*or use this
String drivername = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(drivername); */
}catch(SQLException e){
System.out.println(e.getMessage () + e.toString());
}
}
public static Connection getConnected (String DB) {
System.out.println ("getting connection..."

;
try {
// String jdbc_url = "jdbc

racle:thin

localhost:1521:"+DB;
// Connection conn = DriverManager.getConnection (jdbc_url, "scott", "tiger"

;
String jdbc_url = "jdbc

dbc:"+DB; // DB is the database passed in
Connection conn = DriverManager.getConnection (jdbc_url);
System.out.println ("connection created ..."

;
return conn;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
return null; // never happen
}
public static Statement makeStatement (Connection conn) {
try {
System.out.println ("Making a Statement..."

;
Statement stmt = conn.createStatement ();
System.out.println ("Statement created..."

;
return stmt;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
return null; // never happen
}
public static int openResultSetUpdate (Statement stmt, String query) {
try {
System.out.println ("Creating resultSet..."

;
int rs = stmt.executeUpdate (query);
System.out.println ("Resultset created..."

;
return rs;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
return -1; // never happen
}
public static ResultSet openResultSet (Statement stmt, String query) {
try {
System.out.println ("Creating resultSet..."

;
ResultSet rs = stmt.executeQuery (query);
System.out.println ("Resultset created..."

;
return rs;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
return null; // never happen
}
public static void closeThingsDown (ResultSet rs, Statement stmt, Connection conn) {
try {
System.out.println ("Closing Things Down..."

;
rs.close();
System.out.println ("ResultSet Closed..."

;
stmt.close ();
System.out.println ("Statement closed..."

;
conn.close();
System.out.println ("Connection closed..."

;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
}
public static void closeThingsDown (Statement stmt, Connection conn) {
try {
System.out.println ("ResultSet Closed..."

;
stmt.close ();
System.out.println ("Statement closed..."

;
conn.close();
System.out.println ("Connection closed..."

;
}
catch (SQLException e) {
System.err.println (e.getMessage () + e.toString() );
}
}
}
As you can see all 9 steps are documented..
good luck