Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 sending files to another computer with java help
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
poly




PostPosted: Thu Feb 23, 2006 3:52 pm   Post subject: sending files to another computer with java help

Alright What i want to do is basically send a bunch of files over to my second computer using some java. I don't want it to be an applet or anything.

I have been reading a bunch of stuff on the internet on how to do this, but I am very unclear. I need to send some files from PC 1 to PC 2 - The files are pretty large so they won't fit on my USB drive and I really don't want to burn the a disc so I was wondering if there was a way to transfer files to another IP using sockets directly....

I initially thought it might be possible to do in PHP, if anyone has any incite on this it would be much appreciated. thanks guys,
Sponsor
Sponsor
Sponsor
sponsor
CjGaughan




PostPosted: Fri Feb 24, 2006 9:05 am   Post subject: (No subject)

Do you HAVE to use Java? ..im just a little unclear because you said they are too big for usb, dont want to use usb--so does that mean Java is your only option?

If not, there are many other ways to send files between networked PC's. If you have things set up correctly, its as simple as copying and pasting. You can also use M$Dos (command prompt).

If you HAVE to use java, then I'm definitely not the one to ask on this particular issue. Razz
poly




PostPosted: Fri Feb 24, 2006 9:57 am   Post subject: (No subject)

No see that is my problem... My computers Aren't networked at all. We have two seperate internet connections right now because the one has basic dsl internet and I got the bell high speed ultra cause i like the speed so we are not connected on a network.
I wanted to see if there was a way through the internet by writing a script if i could send the files directly, and i thought it might be possible in java or even PHP....
[Gandalf]




PostPosted: Sat Feb 25, 2006 12:46 pm   Post subject: (No subject)

Set up an ftp server and download from the other computer. Google it if you don't know how.
Token




PostPosted: Wed Mar 01, 2006 10:39 am   Post subject: (No subject)

Why doesent he just sign in on two different messenger accounts and send the files that way?
Stork




PostPosted: Wed Mar 01, 2006 11:57 am   Post subject: (No subject)

It would make more sense just to write a simple client for sending and recieving files.. You'd need to turn off firewalls and enable ports opened in the router (if applicable). It's a very easy & small program to write.

1. Open a server socket on the computer that recieves the file (this is the server)
2. Create a connection from the sending computer to the server (this is the client)
3. Use maybe Data I/O Streams (because they can send both bytes and strings) to send the filename, followed by the file itself to the server.
4. The server recieves the filename with a DataInputStream and creates a new file with the given name. Then uses a FileOutputStream to write all the data to the file.
5. Tidy up (close) the streams & sockets.
poly




PostPosted: Thu Mar 02, 2006 4:59 pm   Post subject: (No subject)

Thank you stork that will help me out greatly - thank you.

Token - i thought about that option and its a stupid one, Messenger is not reliable enough to send large files to another place, most times i get my downloads cancelled halfway through...
Argon




PostPosted: Fri Mar 10, 2006 11:04 pm   Post subject: (No subject)

there is a small program that can split any file into portions of any size go to

http://www.martinstoeckli.ch/splitter/splitter.html

or just get it off the attachment if you are lazy i use this all the time it is simple easy and has always worked



splitl40.zip
 Description:

Download
 Filename:  splitl40.zip
 Filesize:  35.77 KB
 Downloaded:  72 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: