Hi all,
I am using oracle 11g. I write code to connect oracle database with java 1.6, but I can't connect to it. When configure the guide line to below:
I have ojdbc6.jar
,orai18n.jar
, and class12.jar
I set:
Class_Path:
%ORACLE_HOME%\jlib\orai18n.jar;r;%Oracle_home%\jdbc\ojdbc6.jar
After that I run sample java code connect to oracle database, but I met this error below:
C:\Program Files\Java\jdk1.6.0_11\bin>javac c:\JDBCVersion.java
c:\JDBCVersion.java:2: package oracle.jdbc does not exist
import oracle.jdbc.*;
^
c:\JDBCVersion.java:3: package oracle.jdbc.pool does not exist
import oracle.jdbc.pool.OracleDataSource;
^
c:\JDBCVersion.java:8: cannot find symbol
symbol : class OracleDataSource
location: class JDBCVersion
OracleDataSource ods = new OracleDataSource();
^
c:\JDBCVersion.java:8: cannot find symbol
symbol : class OracleDataSource
location: class JDBCVersion
OracleDataSource ods = new OracleDataSource();
^
4 errors
Could anyone help me to settle this problem?
Thanks, Sopolin