r****z 发帖数: 18 | 1 怎样import Oracle的JDBC Driver class? 系统及软件设置如下:
Windows XP, 已装了JDK 6和Oracle Express 10g. 写了个Java小程序,前面几行是:
import java.sql.*;
import oracle.*;
import oracle.pool.OracleDataSource;
javac 就是不认oracle.*和oracle.pool.OracleDataSource。我已经从Oracle网站上下
载了ojdbc6.jar并存于当前目录(放源文件的目录)。我也试了将CLASSPATH改成当前
目录或者在命令行直接输入。这些都不行,到底怎么回事啊?
恳请高人执教!
叩谢! |
f**y 发帖数: 138 | 2 the jar file not the dir has to be in the CLASSPATH. |
r****z 发帖数: 18 | 3 哪个我也试过了:(
【在 f**y 的大作中提到】 : the jar file not the dir has to be in the CLASSPATH.
|
g*****g 发帖数: 34805 | 4 sure it should work.
java -classpath xxx.jar;....; YourProgram
and open that jar using winrar or winzip to see if the class is there.
【在 r****z 的大作中提到】 : 哪个我也试过了:(
|