import java.sql.*;
import java.io.FileInputStream;
import java.util.Properties;
class jdbcCallProc {
  public static void main (String args [])
   throws Exception {
 DriverManager.registerDriver(new
         oracle.jdbc.driver.OracleDriver());
 Properties props = new Properties();
 props.load(new FileInputStream("conn.props"));
 Connection conn = DriverManager
     .getConnection(props.getProperty("url"), props);

 CallableStatement call =
      conn.prepareCall("{? = call greet(?)}");
 call.registerOutParameter(1,java.sql.Types.VARCHAR);
 call.setString(2,args[0]);
 call.execute();
 String answer = call.getString(1);
 System.out.println(answer);
 conn.close();
}}
