Moses DeJong wrote:

> On Tue, 16 Mar 1999, philippe boyer wrote:
>
> This is a known problem with the NT version of JDK 1.2. This is
> a JDK bug and there is nothing Jacl can do to fix it. If you
> have found a workaround I would like to see it, but I am a little
> confused about the change you made to Shell.java

here is the complete file Shell.java I have modified (attached).

> . Could you try this simple echo program out and tell me what changes you would
> make to
> it to fix the problem under JDK 1.2.

I have no workaround for the folowing program, in Shell.java the jdk bug is avoid
at higher level:
The following code looks like the code of tcl.lang.Shell.getLine(). The line I have
changed avoid to
call such getLine().

> public class echo {
>
>     public static void main(String[] argv) throws Exception {
>         System.out.println("Please begin typing, type quit to stop");
>
>         while (true) {
>             int avail = System.in.available();
>
>             if (avail < 0) {
>                 throw new Exception("System.in.available() returned " + avail);
>             } else if (avail == 0) {
>                 Thread.currentThread().sleep(100);
>             } else {
>                 byte[] buff = new byte[avail];
>                 System.in.read(buff);
>
>                 // quit if they typed "quit"
>                 if ((buff.length == 5 || buff.length == 6) &&
>                         buff[0] == 'q' && buff[1] == 'u' &&
>                         buff[2] == 'i' && buff[3] == 't') {System.exit(0);}
>
>
>                 // echo back what was just typed
>                 System.out.println("-----ECHO BEGIN-----");
>                 System.out.write(buff);
>                 System.out.println("-----ECHO END-----");
>                 System.out.println();
>             }
>         }
>     }
> }
>
> thanks
> Mo DeJong
> dejong at cs.umn.edu

If your are looking for "succes stories" about jacl. I am writing a extension to
pilot a java telephony system server with script like: "call A B, answer B A,
conference B A C ...". jacl will be used to generate random telephony scenari to
test  the software pbx.

Philippe, france

Shell.java

Reply via email to