CallableStatement stmt = con.prepareCall(
"{call pkg.proc(?,?)}");
stmt.setInt(1,myInt);
stmt.registerOutParameter(1,OracleTypes.CURSOR);
stmt.execute();
ResultSet rs = (ResultSet)stmt.getObject(2);
This is a fairly basic example. It assumes that you are connected and that the username used to get the connection has permissions to execute the stored procedure. Also, I assumed that you are using oracle. A good reference is
http://www.csee.umbc.edu/help/oracle8/java.815/a64685/basic5.htm Hope it helps