It's not a secret anymore!
The moose likes Java in General and the fly likes FileReader querry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "FileReader querry" Watch "FileReader querry" New topic

FileReader querry

Sadaqatullah Noonari

Joined: Mar 22, 2011
Posts: 13
I am using FileReader class in my code. It say an error when it does not find the file. I want to handle this error such that if file is not found, it makes and then moves on. need help in this problem.
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Put a try/catch when this exception happens, and return/continue(inside a loop).

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

yeah that is easily done. i have an old example i remember...hold on

Visit my download page
I agree. Here's the link:
subject: FileReader querry
It's not a secret anymore!