请问javax.sql是在哪一个jar里的?在线等待
我的程序如下:
package com.tonytan.tourism.db.util;
import java.sql.SQLException;
import java.sql.Connection;
import javax.sql.DataSource;
//import java.sql.*;
//import javax.sql.*;
public class ConnectionPool {
private DataSource ds;
private static ConnectionPool mySelf;
private ConnectionPool(DataSource ds) {
this.ds = ds;
}
public static void init(DataSource ds) {
mySelf = new ConnectionPool(ds);
}
public static ConnectionPool getInstance() {
if (mySelf == null) {
throw new IllegalStateException("Pool not initialized.");
}
return mySelf;
}
public Connection getConnection() throws SQLException {
return ds.getConnection();
}
}
结果出现:
connectionPool.java:5: cannot resolve symbol
symbol : class DataSource
location:class com.tonytan.db.util.ConnectionPool
private DataSource ds;
而我的路径为:classpath=.;d:\jdk\lib\tools.jar;d:\jdk\lib\dt.jar
我需要放哪一个jar在路径里,而这个jar在哪可下载得到?