I am trying to connect to a remote hive server. I have the following maven java code : 

```
private static String driverName = "org.apache.hadoop.hive.jdbc.HiveDriver";
public static void main(String[] args) throws SQLException {

       try {
           // Register driver and create driver instance
           Class.forName(driverName);
       } catch (ClassNotFoundException ex) {
           Logger.getLogger(ForHive.class.getName()).log(Level.SEVERE, null, ex);
       }

  // get connection
  System.out.println("before trying to connect");
  Connection con = DriverManager.getConnection("jdbc:hive://<hostip>:10000/", "hive", "");
  System.out.println("connected");

  // create statement
  Statement stmt = con.createStatement();

  // execute statement
  stmt.executeQuery("CREATE TABLE IF NOT EXISTS "
     +" consultant ( eid int, name String, "
     +" salary String, destignation String)"
     +" COMMENT ‘Employee details’"
     +" ROW FORMAT DELIMITED"
     +" FIELDS TERMINATED BY ‘\t’"
     +" LINES TERMINATED BY ‘\n’"
     +" STORED AS TEXTFILE;");

  System.out.println("Table employee created.");
  con.close();

```

}

But when I execute it gets stuck while trying to connect to the server and throws no exception either.