|
|
Re: getResourceAsStream [message #1231496 is a reply to message #1229786] |
Tue, 14 January 2014 20:33 |
|
On Fri, 10 Jan 2014 09:41:18 -0500, Jayaprakash K wrote:
> I am using eclipse-indigo.
>
> I download a file from internet then use that in eclipse by copying that file to my working place then create a new java project with that same name. In that program there is a line to read a file by using
>
> classname.class.getResourceAsStream("textfilename");
>
> but it throws a NullPointerException.
>
> Then, I create a new java project in eclipse and check that reading this file as a small program,that executes successfully. The files are within the same package in both cases.
>
> Please guide me the above, and also I am looking for advice on how to link a file in eclipse indigo.
> Thanks in advance.
Sometimes it's helpful to write a test file where
you are trying to read the original file from then
locate the test file on disk to see where it actually
got written to.
|
|
|
Powered by
FUDForum. Page generated in 0.07400 seconds