title: How to execute a procedure with JDBC
body: <p>This is my function : </p>
  
  <pre><code>public static void execute_delete_on_db(String pass, String login, String port,
          String host, String table_name, String file_path) throws Exception {
  
      Class.forName("oracle.jdbc.OracleDriver");
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//"
              + host + ":" + port + "/xe", login, pass);
  
      PreparedStatement statement = null;
  
      Statement stmt = null;
      String query = "delete from AA_ALL";
      stmt = conn.createStatement();
      stmt.executeQuery(query);
      sql_statement.close();
      conn.commit();
      conn.close();
  }
  </code></pre>
  
  <p>At least this is the most important part of my function. Above code works fine. I tried to execute my procedure by calling this sql statement :</p>
  
  <pre><code>  EXECUTE delete_all_rows_from_table('all');
  </code></pre>
  
  <p>In Java it looked like this :</p>
  
  <pre><code>String query = "EXECUTE delete_all_rows_from_table('all')";
  </code></pre>
  
  <p>On the database it is working fine, but in Java this is giving me the error.
  Can you tell me what am I doing wrong?</p>