InputStream in = HelpPrinter.class.getResourceAsStream(helpResourcePath); BufferedReader r = new BufferedReader(new InputStreamReader(in));  try { String s; while ((s = r.readLine()) != null) { System.out.println(s); } r.close(); } catch (IOException e) { System.err.print("Resource loading is broken:"); e.printStackTrace(); }
printHelp(helpResourcePath);
  public static void printHelpAndExit(String helpResourcePath)  {    InputStream in = HelpPrinter.class.getResourceAsStream(helpResourcePath);    BufferedReader r = new BufferedReader(new InputStreamReader(in));    try      {        String s;        while ((s = r.readLine()) != null)          {            System.out.println(s);          }        r.close();      }    catch (IOException e)      {        System.err.print("Resource loading is broken:");        e.printStackTrace();      }    System.exit(0);  }