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
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