import oracle.jdbc.*; import java.sql.*; public class JDBCTest { final static String sDBDriver = "oracle.jdbc.driver.OracleDriver"; final static String sConnStr = "jdbc:oracle:oci8:rulebase/rule@arcbeans"; public static void main(String[] args) { Connection conn=null; try { Class.forName(sDBDriver); conn=DriverManager.getConnection(sConnStr); System.out.println("Connect OK"); Statement stat=conn.createStatement(); ResultSet result= stat.executeQuery("Select * from RULES"); while(result.next()) { System.out.println(result.getString(1)); } result.close(); stat.close(); conn.close(); } catch(Exception e) { e.printStackTrace(); } finally { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } }