reading a text file from a remote machine....

hello guys...I need some help regarding this.I want a java file which should read the contents of a text file present in the remote machine, which can accesible through lan.... This is my requirement... waiting for your reply friends...
[264 byte] By [iuytrra] at [2007-11-27 4:58:54]
# 1

> hello guys...

>

> I need some help regarding this.

> I want a java file which should read the contents of

> a text file present in the remote machine, which can

> accesible through lan....

> This is my requirement... waiting for your reply

> friends...

Do you have a specific (Java related) question, or are you looking for someone to do your work?

prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 2
no no...I just wanted to know how this can be done....
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 3
> no no...> I just wanted to know how this can be done....Ok. By what protocol can you connect to that remote machine?
prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 4
telnet, http protocols....
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 5
> ... , http protocols....Have a look at this tutorial then: http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 6
i did that and I got connection refused error....how shud I go about it....plzz help...
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 7

> i did that and I got connection refused error....

> how shud I go about it....

> plzz help...

Needless to say, there must be a web server running on that machine you're trying to connect to! Just as there should be a FTP server running if you want to transfer files through the FTP-protocol.

prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 8
thnx for ur reply...yah that thing is there....its running with http...leave out http protocol...is there any other protocol that satisfies my requirement...Than you...
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 9
please suggest me with the idea by using different protocols other than http...and also how to go about it....Thank you..
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 10
> please suggest me with the idea by using different> protocols other than http...> and also how to go about it....> Thank you..How should I know how your two machines can talk to each other?
prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 11
ok.. let me define it clearly...By using ftp as a protocol how can I read a text file in remote machine........ kindly do reply....and what are the prerequisities that are needed for such a type of operation.....
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 12

> ok.. let me define it clearly...

> By using ftp as a protocol how can I read a text file

> in remote machine........ kindly do reply....

Have a look at this article:

http://www.javaworld.com/javaworld/jw-04-2003/jw-0404-ftp.html

> and what are the prerequisities that are needed for

> such a type of operation.....

(At least) an FTP server should be running on the machine where the text file resides.

Message was edited by:

prometheuzz

Oh, you should have your keyboard fixed: the full stop key seems to be stuck, you have a lot of trailing ..... after each sentence.

prometheuzza at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 13
http://www.informit.com/guides/content.asp?g=java&seqNum=40&rl=1 Plz try this link,Here u will get teh different protocols and how they works...
profilemia at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 14
@promotheuzz and profilemithnkx for the links they are very helpful to me.I will post any doubts if I face problems in the later part of my work.@prometheuzzactually I am habituated to do that... so i cannot restrain myself from doing that...
iuytrra at 2007-7-12 10:14:58 > top of Java-index,Core,Core APIs...
# 15
thank you guys..I got answer to my question....
iuytrra at 2007-7-21 21:16:57 > top of Java-index,Core,Core APIs...