I'm using CachedRowSet to hold the ResultSet form DB. According some demo code: I write below code:
CachedRowSetImpl crs = new CachedRowSetImpl();
But eclipse prompt me that CachedRowSetImpl cannot be resolved to a type. So I know I need to import some package. But I don't know which one to import? Anyone knows?
CachedRowSetImpl class is packaged in rt.jar. So you don't need to add any jar for this class. Can you try to remove JRE currently added to eclipse buildpath and again re-add it.
Use this code:
import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl
...
CachedRowSet rowSet = new CachedRowSetImpl();
If your eclipse classpath is properly set, I mean the jar that includes is in eclipse classpath, then use ctrl+shift+o. This will organize the imports. Adding the missing import and removing the unnecessory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With