• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileNotFoundException  RSS feed

 
sree harsha subraveti
Greenhorn
Posts: 7
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I tried to locate a file using There is a method to find the location where the file is searched for. Can you please tell me how do i locate the directory? I mean, what's the method?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you don't know where the file is?
 
sree harsha subraveti
Greenhorn
Posts: 7
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
haha.. no.. the file "sample.txt". where should it be for the java file to locate sample.txt?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anywhere. you just have to tell java where it is:



obviously, you have to use the correct path for wherever you saved it.
 
Paul Clapham
Sheriff
Posts: 22834
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sree harsha subraveti wrote:When I tried to locate a file using There is a method to find the location where the file is searched for. Can you please tell me how do i locate the directory? I mean, what's the method?


The file is searched for in the current working directory.

You can use the "cd" command to set your current working directory.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:

Fixed that for you.
 
sree harsha subraveti
Greenhorn
Posts: 7
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your help. I could resolve it.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:
fred rosenberger wrote:

Fixed that for you.

thanks...and that is why you always test, test, test...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!