cancel
Showing results for 
Search instead for 
Did you mean: 

FileInputStream is not working

Former Member
0 Kudos

Hi guys,

I am trying to read a txt file from my local disk.But the following code snippet is not working.

IWDInputStream res;

res=WDResourceFactory.createInputStream(new FileInputStream("C:
Documents and Settings
thiruashwin
Desktop
sample.txt"));

Any suggestion?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thirumurugan A ,

IWDInputStream res;

res=WDResourceFactory.createInputStream(new FileInputStream("C:
Documents and Settings
thiruashwin
Desktop
sample.txt"));

mean that your J2EE engine will search for the sample.txt in your J2EE AS side on C:
Documents and Settings
thiruashwin
Desktop

so it is important to tell us more about the J2EE engine side

Regards,

Ng Jia Jun

Answers (4)

Answers (4)

Former Member
0 Kudos

Solved.

Former Member
0 Kudos

Answered

Former Member
0 Kudos

Hi,

Which Exception you are gettin.. ?

If it is FileNotFoundException, and you are using local server make sure that

the file exists in the specified path.

if you are using remote server , place the file "sample.txt" in the path specified

Ragards

LakshmiNarayana

Former Member
0 Kudos

Where is your J2EE engine located? on your local PC?

regards

Stefanie