If this is the same problem you're grappling with in the other posts, then this code is part of an applet, and it should copy a file from a server to the local machine; is that correct? If so, then the problem is not actually copying a file to a different machine, but downloading it from the server and saving it to the LOCAL machine (where no IP address is needed), isn't it?
I outlined three approaches to this problem in this post; let's continue the discussion over there.
you are absolutely right ulf.. this code will become a part of that applet.
what my colleague suggested is that, if i first successfully completed this procedure it is then easily called in that applet.
that is why i'm trying this.. he suggested to use nio api so i'm using that..
you suggested three procedures, but those are little confusing considering my java knowledge..
How does figuring out how to copy a file TO a different machine help you with downloading a file FROM a server to the local machine? Even more so if it's unlikely that the server is even accessible through file I/O?
You are going wrong on a very fundamental level; all this tinkering with file copying will get you precisely nowhere.
If you have questions about the approaches I described, please ask them in the other topic. (By the way, using NIO doesn't add anything to what I suggested over there.)