code: public void delete() throws IOException, InterruptedException {
          // Access to file must be closed before deleting.
          rwfile.close();
  
          file.delete();
  
          // Wait until file has been deleted (deletes are asynchronous on Windows!) otherwise we
          // might shutdown the server and prevent another one from starting.
          for (int i = 0; i < 10 && file.exists(); i++) {
              Thread.sleep(1000);
          }
          if (file.exists()) {
              throw new IOException("Failed to delete file.");
          }
      }
docs: Delete the port file.