Article View: borland.public.jbuilder.java.language
Article #19022Re: I don't understand this error, please help
From: Conrad Hoesle-Kienzlen
Date: Mon, 16 Mar 1998 00:00
Date: Mon, 16 Mar 1998 00:00
39 lines
2157 bytes
2157 bytes
Bill,
System.in requires a console. If you use the execution log, there is no console. There is nothing wrong with your code, go to Project|Parameters and click on
"direct output to system console".
...Conrad
Bill Rooney wrote:
> This is a code segment that is giving me problems.
> Do you understand what I am doing wrong?
>
> import java.io.*;
> class test {
> public static void main(String [] args) throws IOException
> {
> InputStreamReader ISR = new InputStreamReader(System.in);
> BufferedReader BR = new BufferedReader(ISR);
> String curr_string;
> curr_string = BR.readLine();
> System.out.println(curr_string);
> }
> }
> This is the output from the Execution Log.
>
> > C:\JBuilder\java\bin\javaw.exe -classpath "C:\JBuilder\myclasses;C:\JBuilder\lib\jbcl.zip;C:\JBuilder\lib\jgl.zip;C:\JBuilder\java\lib\classes.zip" test
> > AppAccelerator(tm) 1.1.2.018 for Java (JDK 1.1), x86 version.
> > Copyright (c) 1997 Borland International. All Rights Reserved.
> > java.io.IOException: read error
> > at java.io.FileInputStream.read(FileInputStream.java:166)
> > at java.io.BufferedInputStream.read(Compiled Code)
> > at java.io.FilterInputStream.read(FilterInputStream.java:109)
> > at java.io.InputStreamReader.fill(Compiled Code)
> > at java.io.InputStreamReader.read(InputStreamReader.java:235)
> > at java.io.BufferedReader.fill(Compiled Code)
> > at java.io.BufferedReader.readLine(Compiled Code)
> > at test.main(test.java:8)
> >
> Thanks for any help,
> ----Bill
Technical Details
Message-ID:
<350D4C71.A1FA8F22@csi.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<350CB0A8.C439DD3@pitt.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,1b21f84e67cdf870 X-Google-Attributes: gidf74b3,public From: Conrad Hoesle-Kienzlen <Conrad_Hoesle@csi.com> Subject: Re: I don't understand this error, please help Date: 1998/03/16 Message-ID: <350D4C71.A1FA8F22@csi.com> X-Deja-AN: 334574647 Content-Transfer-Encoding: 7bit References: <350CB0A8.C439DD3@pitt.edu> Content-Type: text/plain; charset=us-ascii Organization: CHK IT-Consulting Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language