kiran kumar
kiran kumar

Reputation: 19

How to read a text file from a remote server location

I have a text file with the name textfile1.txt in C: location and this file conatains in a server machine and the machine ip is 1.127.0.0,

I want to read this text file in my java application and display the content,

Please help me in this,

Thanks in Advance,

Thanks, Kiran

Upvotes: 0

Views: 2310

Answers (2)

Simeon
Simeon

Reputation: 7792

You could copy the file to your local machine and read it from there.

This answer could help you do it.

Upvotes: 0

jornb87
jornb87

Reputation: 1461

Put the file in a shared folder on the server, and use standard java IO to reference that filepath, e.g. \\<your server ip>\shared\textfile1.txt.

Upvotes: 1

Related Questions