解决了困扰已久的一个问题

前面程序用到了WebRowSet,用的实现包是sun 提供的,但是用ant编译的时候会出现如下:
warning: com.sun.rowset.WebRowSetImpl is Sun proprietary API and may be removed in a future release
-------------------------------------------
尝试了所有的ant编译参数还是未能搞定这个问题...
只能每次ant完泛型有一堆的提示信息,但是最后会有个Build success
郁闷啊,我Eclipse可是一个黄xx都木有的。今天终于搞定了这个问题:
webRS = new WebRowSetImpl();
上面是原来的代码,可以使用如下的代码替代:
public static WebRowSet getWebRowSet() throws SQLException {
try {
return (WebRowSet) Class.forName(
"com.sun.rowset.WebRowSetImpl").newInstance();
} catch (Exception e) {
throw new SQLException("Could not create a CachedRowSet", e);
}
}
然后使用这个静态方法代替new就可以了....
原因呢....尚待考证
出处:http://bluesterror.livejournal.com/129681.html?thread=141201#t141201
原文地址:https://www.cnblogs.com/macula7/p/1960386.html