06 | import oracle.jdbc.pool.OracleDataSource; |
09 | public static void main( String args[ ] ) throws SQLException { |
10 | String user = "C##userid" ; |
11 | String password = args[ 0 ].trim( ); |
12 | String database = "65.52.222.73:1521/cdb1" ; |
15 | OracleDataSource ods = new OracleDataSource( ); |
16 | ods.setURL ( "jdbc:oracle:thin:@" + database ); |
18 | ods.setPassword( password ); |
21 | System.out.println( "<html><body>" ); |
22 | System.out.println( "<font color='#3366CC' face='Helvetica'><h3>" ); |
23 | Connection conn = ods.getConnection( ); |
25 | System.out.println( "Successfully connected!" ); |
29 | catch ( SQLException e ) { |
30 | System.out.println( e ); |
32 | System.out.println( "</h3></font></body</html>" ); |
|