Skip to Main Content

New to Java

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!

unreported exception must be caught or declared. how?

807598Nov 1 2006 — edited Nov 1 2006
the problem is that if i declare a new FileReader e.g.
static BufferedReader ffInpBuffer = new BufferedReader( new FileReader(inp_path));
compilator says

"File: G:\projects\Java\xmlconverter\Strstore.java [line: 12]
Error: unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown"

how can i do that? without try/catch-blocks(if i use them declaring, the FileReader is somewhy visible from nowhere)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2006
Added on Nov 1 2006
12 comments
456 views