Writing JavaScript in Rhino is an unusual experience at best. On the one hand, it’s JavaScript, one of (if not the) most flexible, dynamic languages there is. On the other hand, you’re using the behemoth of verbosity that is the Java API. So you end up writing like
var buf = new BufferedReader(new InputStreamReader(new DataInputStream(new FileInputStream("conf/routes"))));