Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "FileReader querry" Watch "FileReader querry" New topic
Author

FileReader querry

Sadaqatullah Noonari
Greenhorn

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).


[uaiHebert.com] [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: 4340
    
    2

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


SCJP
Visit my download page
 
Consider Paul's rocket mass heater.
 
subject: FileReader querry
 
Similar Threads
FileReader: why does this simple code not run?
Current Working Directory?
how to read a file inside a JSP
Reading files in applet
Reading from a file