Copying a file physically from client to server.

Hi,

I want to copy a file from the client to the server machine using java application. I am using JFileChooser .

The problem is that by means of this the copy is possible if the files exist on the same machine but not when the file has to be copied from 1 machine to another.

Thus physically the file does not pass to the server .

The path is the only thing which moves on .

Can this problem be handled in JAVA . I want the file to be copied in it's original form. i.e if the source file is 123.doc then the destination file should be the same , thus i do not want the contents to be copied but the file itself should be copied to the destination .

Regards,

RDeveloper.

[721 byte] By [RDevelopera] at [2007-11-27 4:24:26]
# 1
Double-post: http://forum.java.sun.com/thread.jspa?threadID=5172665&messageID=9664952#9664952
BIJ001a at 2007-7-12 9:32:13 > top of Java-index,Core,Core APIs...
# 2

you want then to magically do it. copying without copying the content only the file itself.

I guess you must read the file sotre it, pass it via tcp and then reconstruct it.

there is a way to move files using the File class and the renameTo method, but this will move the file to a given path that maybe could be something like \\192.168.0.1\demo\whatever.

MelGohana at 2007-7-12 9:32:13 > top of Java-index,Core,Core APIs...