Hi every body,
i have to send an immage to a remote server, but when i do run, i
didi't have console error or unsuccesful writing, but the image dosen't
appare in the folder....
tha file has this adress..
static String dest_source_folder =
"\\\\elmsrv-ese02\\ELMTEST-REPOSITORY\\ELM2\\WebSrv\\www\\app\\webroot\\img\\";
String dest = new String(dest_source_folder + "mio.jpg");
and i try to send with..
ImageIO.write(dest, "JPG", new File(destFile);
the run give me an error:
Exception in thread "main" java.net.MalformedURLException: no protocol:
\\elmsrv-ese02\ELMTEST-REPOSITORY\ELM2\WebSrv\www\app\webroot\img\mio.jpg
what i have ti do to send this immage to the correct adress? (i sure
need to insert user ad pass word)
thk..
Brandon McCombs - 14 Oct 2006 00:51 GMT
> Hi every body,
>
[quoted text clipped - 22 lines]
>
> thk..
Well it seems that Java doesn't know how to use UNC path names and
therefore it can't write the file. You may need to open a socket and
send it "manually" unless you can use some other protocol such as ftp
that java understands. If you open a socket you'll need to write another
program that runs on the server that can receive your request from the
client.