In Feburary 2016 15,
Install a Java IDE such as NetBeans.
Download JDBC drivers for the oracle database version you are connecting to. These are available at the link below.
Depending on your database, the file should be named something like ojdbc14.jar or classes12.zip.
Move the driver files to the following folder: C:\Program Files\Java\jdk1.6.0\jre\lib\ext. (or the folder corresponding to the Java version that you have installed). Attempt to connect using the Java code below and if you have successfully connected to the database, you can skip Step 4.
Add the JDBC drivers to your project library. If you are using NetBeans, go to Tools->Java Platforms and on the source tab, add the drivers. Next, you should right click on your project and go to Properties->Libraries and add the drivers in the compile and run tabs.
The Java code samples linked below can be used to connect to your oracle database. The same code may be used for reading or writing to a database, just change the sql statement.
In Feburary 2016 15,