ftp with java using UNC paths ?

N

news.amnet.net.au

Hi

I need to do some uploading with Java and found that I cannot use Windows
UNC paths, notwithstanding that from the command line the UNC paths work
fine. I have also tried some freeware packages that use Java ftp, to see if
they perhaps cater for it, but all their methods for uploading refuse to
work with UNC paths. However, from the command line UNC paths are accepted
fine by the ftp server I am connecting to.

So if on the command line I do this (after I log into my ftp server):

ftp> send source_directory destination_directory

where I use a UNC path for the source directory:

ftp send \\myothercomputer\some\path\file.txt /home/myhome/file.txt

it works.

But using methods in Java that have the same source and destination
directories as input parameters, it does not work. Even if I make the client
machine's directory a share and map that share on my ftp server as a drive
letter, still the ftp upload does not work. This means I can only use ftp
from the local machine (server) to the same local machine (server). Note
that I am calling my ftp bean from a jsp in a browser window - perhaps this
has something to do with it?

Is there any way to use UNC paths i.e. paths with \\othercomputer\directory
with java ftp? Note that I am using jdk-1_3_1_01 as I have to use an older
jdk version to work with Oracle.

Any help will be greatly appreciated.

Thanks

Hugo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top