Generally after writing import oracle.jdbc.driver.*; Statement, you will find an error. At this point you need:
First, add the JDBC driver to the Classpath
Two different methods. One is graphical, computer-Properties-Advanced settings-Environment variables-edit path, add absolute path \JDBC driver name such as C:\jdbc\lib\ojdc6.jar; Here the JDBC driver has a version of the problem.
The second is the CMD command line setting, C:\>set classpath=.; Absolute path name \JDBC driver name
Second, in their own projects to import this driver
Because I am a novice in Java, this is always forgotten, the content of the online search mentioned this is not much.
You need to right-click on your project Riku to import the resource, such as Ojdbc6.jar.
Other similar, do not import, such as when you want to use the Oracle Spatial provided by Sdoapi.jar and Sdoutl.jar, also need to import here, as well as the previous step to add to classpath.
Java Connection to Oracle database