The exception is as follows:
Java.lang.ClassNotFoundException:oracle.jdbc.driver.OracleDriver
At Java.net.urlclassloader$1.run (urlclassloader.java:200)
At Java.security.AccessController.doPrivileged (Native method)
At Java.net.URLClassLoader.findClass (urlclassloader.java:188)
At Java.lang.ClassLoader.loadClass (classloader.java:306)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:268)
At Java.lang.ClassLoader.loadClass (classloader.java:251)
At Java.lang.ClassLoader.loadClassInternal (classloader.java:319)
At JAVA.LANG.CLASS.FORNAME0 (Native method)
At Java.lang.Class.forName (class.java:164)
at JDBC. Huaweijdbctest.getconnection (jdbctest.java:26)
at JDBC. Huaweijdbctest.main (jdbctest.java:54)
Exception in thread "main" java.lang.NullPointerException
at JDBC. Huaweijdbctest.main (jdbctest.java:55)
Workaround:
Under D:oracleora92jdbclib (your Oracle installation directory) there are many. jar package files, copy the Ojdbc14.jar to your project, right-click the file, choose Build path to select the Import option, You can now open and use the class file under the package. Of course, you can also, put the driver in the CLASSPATH environment variable, the other class package settings are similar
Finish
</