Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Buffered File Reader  RSS feed

 
Kevin Girard
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to read some data from a text file, and I'm using JBuilder 7... It's giving me File Not Found Exceptions no matter where I put the file that I can think of... is there some specific place that anyone knows of that I should have stored this text file so that my IDE can find it?
Thanks.
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think something else is wrong. It shouldn't matter to your IDE where you put the file as long as you (the user) has access to it. Can you post the code that's causing the Exception and the Exception details?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several possible solutions to this:
  • Use the complete path name rather than a relative name - e.g. "C:\\dir1\\dir2\\filename.txt" rather than "dir2\\filename.txt".
  • Find out what base directory is being used to interpret file names using the following code:

  • and put files in this directory instead.
  • Reconfigure JBuilder to change the base directory. On JBuilder 5 this is controlled from Project -> Project Properties -> Paths -> Working Directory. It may be different on JBuilder 7, but I'm sure an equivalent option is there.

  • [ September 19, 2002: Message edited by: Jim Yingst ]
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!