This is my code for which I am getting error. My classes12.jar
has been imported as an external jar.
import java.io.IOException;
import java.io.
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.
You can add a JAR which having above specified class exist e.g.ojdbc jar which supported by installed java version, also make sure that you have added it into classpath.