In my signed applet I have an Image object, Now I want to save this Image at getCodebase() by creating a new file. I use:
File file2=new File(getCodeBase()+"newFile.gif");
file2.createNewFile();
ImageIO.write(myImage, "png", file2);
To create new file then ImageIO to write file at this destination but it gives the following error.
http://192.168.1.119:96/res/applet/newFile.gif
pgraph.sendImageToServer... exceptionThe filename, directory name, or volume label syntax is incorrect
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(Unknown Source)
How to save image on the server from a signed applet?
Fileobject, thatFilewill point to somewhere on the file-system of the end user’s PC. It can never point back to the server.