0

I have created a Java Project in Eclipse. My JDK is 1.6.0_34. I want to use the implementation of javax.sql.rowset.CachedRowSet interface in one of my class. I know Sun/Oracle wrote its implementation as CachedRowSetImpl and it should be part of JDK. But I am not getting it. This is my code:

CachedRowSet cachedRowSet = new CachedRowSetImpl();

This is the error message Eclipse is giving me:

CachedRowSetImpl cannot be resolved to a type

What I am doing wrong here?

srh
  • 1,661
  • 4
  • 30
  • 57
  • do you have `import com.sun.rowset.CachedRowSetImpl;` ? – Iłya Bursov Apr 14 '15 at 20:09
  • When I type in `import com.sun.rowset.CachedRowSetImpl;` I got this error **Access restriction: The type CachedRowSetImpl is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar** – srh Apr 14 '15 at 20:15
  • http://www.coderanch.com/t/540789/JDBC/databases/troubles-importing-CachedRowSetImpl – Iłya Bursov Apr 14 '15 at 20:20
  • Thanks. I don't want to change the eclipse _Forbidden reference (access rules)_ from error to warning. So instead I configure the build path: first remove the JRE and then add it back. And it is working now! Damn. A bug in Eclipse? – srh Apr 14 '15 at 20:26

0 Answers0