Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading the contents of a file  RSS feed

 
little me
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following code, which takes a file as input; reads through each line (each line is a filepath); and then opens each file that is listed in the input file.

Right now, I am having problems opening the initial input file, where it jumps straight to my catch statement saying that it can't open the file. Below is the code:

 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. You can change your display name here. Thanks!
 
Jan-Jaap van Nieuwkerk
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could be wrong but shouldn't the ; in C;/dir.txt be a :
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!