Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.net

Status
Not open for further replies.

jcamp

Programmer
Mar 31, 2004
31
US
i know this is vague, but can someone point me in the right direction.

i'm wanting to use java.net to log onto a remote computer and retrieve information on the directory structure of that computer.

(assume i have a username and password by which to telnet or ftp)

a skeleton program would be wonderful!!

 
chrissie,

perhaps i'm barking up the wrong tree, but i want to be able to write a java program that will connect to a remote server and allow me to see the directory contents - however that is accomplished.
 
Assuming of course the target machine is running an FTP daemon.

jcamp : Perhaps you should say more about what OS the machine is running, and which network daemons it is running !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Good point sedj.

Yes, I think I made a whopping assumption with my recommendation. jcamp, we do need something specific about your question to guide us. Simply saying '...connect to a remote server' can mean absolutely anything. Ftp would give you the ability to do this and get you directory / file info but you would need an ftp daemon / service running on the server.

Tim
 
now my thinking is moving in the right direction. thanks.

ultimately what i'm after is to be able to log into a remote server and compare files in various directories (using diff or something like it). i had assumed, perhaps wrongly, that java was the way to do this but i've been wrong plenty of times before :)

any ideas ???
 
once again, sorry about the vagueness in my last post. here is what i'm trying to do:

given any unix server on my network, log onto it from my windows xp box, pass two directory names, and have the differences between directory contents displayed (or brought back as a diff file)on my windows box.

a friend of mine attempted using ftp but to no avail. i was thinking somehow java could be used but i'm open to any suggestions. also, if i should be going to a different forum, please let me know.

thanks a bazillion for your patience!
 
OK, FTP is certainly not what you want then - this is just a File Transfer Protocol ...

The obvious question is why do you not just ssh onto the box, run the diff, and copy it over using scp ?

Or use some programme like Beyond Compare for windows .

Or download UnixUtils from sourceforge (a win32 port of most nix utilities), and use the diff programme in that ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
thanks for the tips!! i've gotten what i needed.
 
So whats your solution in the end ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
thanks to your tip, i found a "freeware" program called TreeComp that does exactly what i wanted - although i did enjoy several hours of trying to figure out how to make java do it :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top