Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to Transfer a file/jar to another Computer

 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to move a jar file to a network system without using client-server technology.

I am having a xyz.jar in my system, i want to pass this file to a system in local network. All computers
in the network are not shared. Guide me which package, framework i have to work to get it done

cheers
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, how would you do this not using Java? You need to figure out what underlying protocol you'er going to use, you can then choose a java package to assist you.
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TCP/IP

normal network setup with 15 computers connected.

I tried java.io, it works when the drive or folder is shared.

I want to move the file without sharing any folder or drive
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, Have you had a search on our FAQ sections for the FileUpload servlet?
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for file transfer without client-server terminology
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well then you need to do SCP or something similar, those things aren't done over TCP though.
 
Birla Murugesan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

well,As Martijn Verburg said,you have to go for scp command.
i think,the possibilty is less in framework level to move files to unshared system.
Anybody correct me,if i was wrong.
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with SCP.

One doubt Is SCP works fine in TCP environment?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read up on the SCP protocol? I suggest you google it, things will become a lot clearer then .
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on it, i have downloaded the "jsch-0.1.41" file and added to my project, and
trying to execute the programs in example folder. But still its not working.


As soon as i got executed the program i ll get back to you.

thank you Martijn.

 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are planning something on the lines of automatic update, then you can even consider "Java Web Start" for the same.
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Web Start is based on server-client technology. As far as i know in java web start, the client have to
click a link to get downloaded particular file. But I want the server system to send files to the client systems
using IP address.


Is it possible in JWS?
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm No.

But then, you mentioned you havent been having much of a luck with your SCP stuff, and hence I mentioned JWS.

"jsch" will open an SCP/SSH connection with your linux/unix boxes and you can internally use the SCP command to do the transfer. I dont understand what is stopping you from doing this. If you already tried it, and was not able to achieve the result, would you give me the stacktrace/logs anything so that we could get some pointers ?

Incase if you want to transfer your files to windows boxes, then just share a folder in the target machine, and do a normal filecopy using java, with the full network path of the target windows box, till the shared folder.
 
Dinesh Jayram
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the primary constraint in my project is "The folder should not be shared."

Moreover i am using windows xp, Is there any command line commands to send file between two systems?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FTP?

You can't just "send another computer a file" without the other computer being able to receive it some way, either by running a service, sharing a folder, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic