Solution for the Program Package oracle. JDBC. driver does not exist

Source: Internet
Author: User

C: \ Users \ User> javac-encoding UTF-8 des. Java
Des. Java: 87:Error:ProgramThe Oracle. JDBC. Driver package does not exist.
Drivermanager. registerdriver (New Oracle. JDBC. Driver. oracledriver ());
^
Des. Java: 107: error: the package oracle. JDBC. driver does not exist.
Drivermanager. registerdriver (New Oracle. JDBC. Driver. oracledriver ());
^
Des. Java: 127: error: the package oracle. JDBC. driver does not exist.
Drivermanager. registerdriver (New Oracle. JDBC. Driver. oracledriver ());
^
3 errors

C: \ Users \ User> classpath
Classpath = .; c: \ Java \ JDK \ Lib \ DT. jar; C: \ Java \ JDK \ Lib \ tools. jar; D: \ apcat \ bin; D: \ classlib; C: \ Program Files (x86) \ Java \ jre6 \ Lib \ ext \ qtjava.zip

Add the following red text

C: \ Users \ User>Set classpath = .; c: \ Java \ JDK \ Lib \ DT. jar; C: \ Java \ JDK \ Lib \ tools. jar; D: \ apcat \ bin; D: \ classlib; C: \ Program Files (x86) \ Java \ jre6 \ Lib \ ext \ qtjav
A.zip;D: \ classlib \ dblib \ ojdbc14.jar

C: \ Users \ User> javac-encoding UTF-8 des. Java

C: \ Users \ User>

Error cause: javac cannot find the ojdbc14.jar driver package

Solution: Specify the path of the jar in classpath.

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.