Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 A realll quicky with files
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
tlivingston




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Thu May 13, 2004 7:42 pm   Post subject: (No subject)

use relative paths.
tlivingston




PostPosted: Thu May 13, 2004 9:36 pm   Post subject: (No subject)

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

Thanks,

Ted
rizzix




PostPosted: Thu May 13, 2004 11:05 pm   Post subject: (No subject)

"highscore.txt" or "./highscore.txt" its all relative
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: