cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a text file to a remote machine through WD Application

Former Member
0 Kudos

Hi ,

I have a requirement :

I want to write a text file into a remote machine(Which is not the machine where my Webdynpro application is deployed/ which is not the J2EE server)

[code]

FileWriter fil = new FileWriter(new File("

<RemoteMachineIP>/E$/PP/"+FilePath));

[/code]

through this statement I am getting the Exception:

java.io.FileNotFoundException:
<systemIP>\e$\PP\PP496.TXT(Logon failure: unknown user name or bad password)

How can I solve this.

It would be appreciable, if any one helps

Thanks

Smitha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai ,

when u want read or write or open the file in remote end or any pc u must serialize the class once u serialize the class every thing will be visilble to remote end

thanks & regards ,

venkat

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Can I do it using the same code ,

by making the destination folder(in remote machine) shared

and by giving full control permission to the folder?

Please help me

thanks

Smitha

Former Member
0 Kudos

Hi,

E$ is a administrative Share.

Pl try to create a folder and share it with EveryOne full control.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks,

I'll try and let you know.

thanks

smitha

Former Member
0 Kudos

Hi

I made the remote machine's folder shared and gave full permission.

So I can write to that, from a simple java application.

But when I try to do the same through WD, 'The network path was not found" error is coming.

Is it because , the remote machine is not accessible from the Machine where J2EE server resides?

please help

thanks

Smitha

Former Member
0 Kudos

Hi,

Try to access the same shared folder from the windows explorer where the J2EE engine exists.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

I can ping the remote machine from J2ee server .

But I was not able to access the shared folder?

<b>If the destination shared folder has the full permission,

then is it needed to supply uname and pwd through WD coding to access the remote shared folder?</b>

thanks a lot for your replies.

Thnaks

Smitha

Former Member
0 Kudos

Hi,

Server where your J2ee Engine and the shared folder belong to the same Domain.

If not then provide every one from the other domain too to the share.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi

Thanks

I 'll do that. but now I don't have that permission.

Let me confirm one more thing.

<b>If the destination shared folder has the full permission,

then is it needed to supply uname and pwd through WD coding to access the remote shared folder?</b>

Plz reply

Thanks

Smitha

Former Member
0 Kudos

Hi,

Ideally no..

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Thanks a lot.

I 'll let you know, once it starts working..

regards

Smitha

Former Member
0 Kudos

Hi,

Again Logon failure was coming.

So again through coding, I executed the file path in command line.

Now it is working.

thanks

Smitha