public static void main(String[] args) throws NoSuchProviderException, NoSuchAlgorithmException {
    System.out.println("Starting rfid-reader2keyboard");

    Security.insertProviderAt(new Smartcardio(), 1);
    TerminalFactory.getInstance("PC/SC", null);

    System.out.println("The following terminals were detected:");
    System.out.println(Read.listTerminals());

    System.out.println();
    System.out.println(
        "inventid RFID capturing is currently active. Close this dialog to deactivate.");
    System.out.println(
        "The most likely reason you see this is in order to resolve any issue you ay have found. Please follow"
            + " the instructions of inventid support and send these lines to the given email address");

    executorService.scheduleAtFixedRate(errorLogger, 10, 30, TimeUnit.SECONDS);
    executorService.scheduleAtFixedRate(detectorLoop, 10, 15, TimeUnit.SECONDS);

    Read reader = new Read();
    reader.startRunning();

    Runtime.getRuntime()
        .addShutdownHook(
            new Thread() {
              public void run() {
                executorService.shutdownNow();
                System.out.println(
                    "inventid RFID capturing is now inactive. You can close this dialog");
              }
            });
  }
 public void run() {
   System.out.println(Read.listTerminals());
 }