0

what are the drivers which are used to connect with java for Desktop application. i have found many types like tiny and all but was not able to understand. Please help me out

jmj
  • 237,923
  • 42
  • 401
  • 438
ChArAnJiT
  • 238
  • 1
  • 7
  • 23

5 Answers5

4

To make your life easier, I would recommend just using Oracle's Thin Driver.

First, download the driver from Oracle's site:

http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

Then add JAR to your project and connect to database using:

Class.forName ("oracle.jdbc.driver.OracleDriver");

Connection conn = DriverManager.getConnection
        ("jdbc:oracle:thin:@//localhost:1521/orcl", "scott", "tiger");

Of course, replace these parameters with the ones corresponding to your DB.

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
3

Have you looked into official site

See Also

jmj
  • 237,923
  • 42
  • 401
  • 438
1

for oracle 10g the JDBC driver is "ojdbc10_g.jar"

it is available on your system inside %ORACLE_HOME\jdbc\lib No need to download.

Class.forName ("oracle.jdbc.driver.OracleDriver"); 

Connection conn = DriverManager.getConnection         ("jdbc:oracle:thin:@//localhost:1521/orcl", "scott", "tiger"); 

conn.setAutoCommit(false);
animuson
  • 53,861
  • 28
  • 137
  • 147
pintu
  • 11
  • 1
0

The "thin" driver is a 100% java implementation. The OCI calls the C implementation. There might even be a JDBC to ODBC bridge, allowing you to use your system's ODBC driver. Suggested reading: Oracle Instant Client

FelipeFG
  • 520
  • 3
  • 5
0

The easiest one to deploy is probably the type 4 driver, or the thin driver. I say it is the easiest because it does not rely on any Oracle native libraries or client install to operate. It is readily available from Oracle.

Brent Worden
  • 10,624
  • 7
  • 52
  • 57