System.err.println("Could not query libarary version");
System.err.println("Could not query library version");
  public static void main(String[] args) {    String line;        // Readline.setThrowExceptionOnUnsupportedMethod(true);        if (args.length > 1)      Readline.load(ReadlineLibrary.byName(args[1]));    else      Readline.load(ReadlineLibrary.GnuReadline);		        System.out.println("initializing Readline...");    Readline.initReadline("ReadLineTest"); // init, set app name, read inputrc    System.out.println("... done");    try {      if (args.length > 0)	Readline.readInitFile(args[0]);    // read private inputrc    } catch (IOException e) {              // this deletes any initialization      System.out.println(e.toString());    // from /etc/inputrc and ~/.inputrc	System.exit(0);    }    // read history file, if available    File history = new File(".rltest_history");    try {      if (history.exists())	Readline.readHistoryFile(history.getName());    } catch (Exception e) {      System.err.println("Error reading history file!");    }          // define some additional function keys    Readline.parseAndBind("\"\\e[18~\":	\"Function key F7\"");    Readline.parseAndBind("\"\\e[19~\":	\"Function key F8\"");    // Set word break characters    try {      String breakChars = 	Readline.getVar(Readline.RL_COMPLETER_WORD_BREAK_CHARACTERS);      System.out.println("word-break-chars: " + breakChars);      breakChars = 	Readline.setVar(Readline.RL_COMPLETER_WORD_BREAK_CHARACTERS,"abc");      System.out.println("word-break-chars: " + breakChars);      breakChars = 	Readline.getVar(Readline.RL_COMPLETER_WORD_BREAK_CHARACTERS);      System.out.println("word-break-chars: " + breakChars);      Readline.setWordBreakCharacters(" \t;");      breakChars = 	Readline.getVar(Readline.RL_COMPLETER_WORD_BREAK_CHARACTERS);      System.out.println("word-break-chars: " + breakChars);    } catch (UnsupportedEncodingException enc) {      System.err.println("Could not set word break characters");      System.exit(0);    }    // query version    try {      String version = Readline.getVar(Readline.RL_LIBRARY_VERSION);      System.out.println("Readline-Version: " + version);    } catch (UnsupportedEncodingException enc) {      System.err.println("Could not query libarary version");      System.exit(0);    }        // set test completer    Readline.setCompleter(new TestCompleter());    // main input loop    while (true) {      try {	line = Readline.readline("linux> ");	if (line == null)	  System.out.println("no input");	else	  System.out.println("line = >" + line + "<");      } catch (UnsupportedEncodingException enc) {	System.err.println("caught UnsupportedEncodingException");	break;      } catch (IOException eof) {	break;      }    }    try {      Readline.writeHistoryFile(history.getName());    } catch (Exception e) {      System.err.println("Error writing history file!");    }    System.out.println();    Readline.cleanup();    System.exit(0);  }