I was able to accomplish that with JDBC as follows:
String dbServer="DBSERVER";
String port="1521";
String SID="DBNAME";
String url = "jdbc:oracle:thin:@"+dbServer+":"+port+":"+SID;
Driver driver = new oracle.jdbc.OracleDriver();
DriverManager.registerDriver(driver);
Properties props = new Properties();
//props.setProperty(OracleConnection.CONNECTION_PROPERTY_THIN_VSESSION_OSUSER,osUser);
Connection conn = DriverManager.getConnection(url, props);
you must use the jar ojdbc6.jar
according to this link: http://docs.oracle.com/cd/E18283_01/java.112/e16548/clntsec.htm
all i needed is to give os access for current machine to this oracle database.