Computer Science Canada

A realll quicky with files

Author:  tlivingston [ Thu May 13, 2004 6:30 pm ]
Post subject:  A realll quicky with files

K how do i make it so that when i write/ read from a file, it will find the file in the same place as where teh class is saved?

Eg Instead of ==> FileReader fin = new FileReader("c://highScore.txt");

==> FileReader fin = new FileReader("place where class is saved//highScore.txt");


Thanks,

Ted

Author:  rizzix [ Thu May 13, 2004 7:42 pm ]
Post subject: 

use relative paths.

Author:  tlivingston [ Thu May 13, 2004 9:36 pm ]
Post subject: 

i have no idea what that means....lol...so like what do i put instead of c:\\highScore.txt?

Thanks,

Ted

Author:  rizzix [ Thu May 13, 2004 11:05 pm ]
Post subject: 

"highscore.txt" or "./highscore.txt" its all relative


: