read write file problem [message #148882] |
Tue, 16 March 2004 22:21 |
Eclipse User |
|
|
|
Originally posted by: qwang.cs.concordia.ca
I am a beginner of Eclipse. I write a simple java program
(ReadFile.java)to read the text file. It execute normal in a tranditional
way. However,when I copy it to Eclipse,it give me the message"the file not
found". The text file"test.dat" ,which the program will read is in the
same package fold as the (ReadFile.java). For example, I have the project
named"testfileio",package"rwfile",class"ReadFile.java", textfile"test.dat"
is in the rwfile package also. why this happen? where should I copy the
text file so as that it can be read? your kindly help will really
appreciated.
Linda
|
|
|
Re: read write file problem [message #148890 is a reply to message #148882] |
Tue, 16 March 2004 23:09 |
Eclipse User |
|
|
|
Originally posted by: newsserver_mails.bodden.de
The file is always looked up in the root package. So you must refer to
"rwfile/test.dat".
Eric
linda wang maundered in <c37ukd$1tg$1@eclipse.org>
> I am a beginner of Eclipse. I write a simple java program
> (ReadFile.java)to read the text file. It execute normal in a
> tranditional way. However,when I copy it to Eclipse,it give me the
> message"the file not found". The text file"test.dat" ,which the
> program will read is in the same package fold as the
> (ReadFile.java). For example, I have the project
> named"testfileio",package"rwfile",class"ReadFile.java",
> textfile"test.dat" is in the rwfile package also. why this happen?
> where should I copy the text file so as that it can be read? your
> kindly help will really appreciated.
>
> Linda
--
------------------------------------------------------------ -----
Eric Bodden
ICQ UIN: 12656220
Website: http://www.bodden.de
PGP key available
|
|
|
|
Powered by
FUDForum. Page generated in 0.03684 seconds