java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Just add the ojdbc14.jar to your classpath.
The following are the steps that are given below to add ojdbc14.jar in eclipse:
1) Inside your project
2) Libraries
3) Right click on JRE System Library
4) Build Path
5) Select Configure Build Path
6) Click on Add external JARs...
7) C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib
8) Here you will get ojdbc14.jar
9) select here
10) open
11) ok
save and run the program you will get output.