🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19677

IOException error

#19677
From: wmarty
Date: Mon, 12 Jan 1998 00:00
37 lines
1752 bytes
I wrote this simple application to experiment with console output versus
the Execution Log. This application runs fine when its output goes to
the console, but produces a

    "java.io.IOException:read error"

for the "System.in.read()" method call when the output is sent to the
Execution Log. Does anyone know why? Is it possible that the Execution
Log only works with output?

// ---------------------------------------------------------
import java.io.*;

public class test {
   public static void main(String args[]) throws IOException
   {
      int grade;

      System.out.print("Enter letter grade: ");
      grade = System.in.read();
      System.out.println("Entered letter grade is " + grade);
   }
}
// ---------------------------------------------------------

Also, when the application is producing console output the DOS window
closes after the application ends. I found the "Close on exit" option in
the Properties window but whether this option is checked or not does not
affect the closing of the window. It always closes! Is there any way to
either keep this window open or reopen it after it has been closed? I've
seen this question posed in other newsgroups but have yet to see anyone
answer it.

Thanks!

Walter Martynenko.
Technical Details
Message-ID: <34BACD0E.FC2CB1B1@erols.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,345399f298d9f135,start
X-Google-Attributes: gidf74b3,public
From: wmarty <wmarty@erols.com>
Subject: IOException error
Date: 1998/01/12
Message-ID: <34BACD0E.FC2CB1B1@erols.com>
X-Deja-AN: 315404075
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: None
Mime-Version: 1.0
Reply-To: wmarty@erols.com
Newsgroups: borland.public.jbuilder.java.language