Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Execute rebol from java

From: hallvard:ystad:helpinhand at: 3-Jan-2002 18:01

Dixit Anton Rolls (07.25 03.01.2002):
>Does anyone have any java code to execute a rebol script?
How about this (copied from a class I had laying around): try { Process p = Runtime.getRuntime().exec("Your command here"); BufferedReader pi = new BufferedReader (new InputStreamReader(p.getInputStream())); BufferedReader pe = new BufferedReader (new InputStreamReader(p.getErrorStream())); while ((s = pi.readLine()) != null) { System.out.println(s + "\n"); } while ((s = pe.readLine()) != null) { System.out.println(s + "\n"); } } catch (Exception e) { e.printStackTrace(); }
>I am having serious withdrawal symptoms today. >I am forced to use java at work here, and I just came across >a problem that would have been short, elegant and simple in >rebol, and almost downright impossible in java (it seems).
This reminds me of the proxyserver I wrote in 40 lines of rebol code to replace 20k / 5 classes of java a few weeks ago... Good luck! ~H