Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

invalid handle runtime error

807603Dec 16 2007
Enter name of file:
Exception in thread "main" java.io.IOException: The handle is invalid
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at crapo.main(crapo.java:15)

Tool completed with exit code 1



import java.io.*;



public class crapo{
public static void main(String[] args) throws IOException {




BufferedReader keys = new BufferedReader(
new InputStreamReader( System.in ));
System.out.println("Enter name of file: ");
String fileName = keys.readLine();

}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2008
Added on Dec 16 2007
0 comments
170 views