This discussion is archived
1 Reply Latest reply: Nov 1, 2011 2:07 AM by sabre150 RSS

How to create dynamic applet to create file on client side

896918 Newbie
Currently Being Moderated
Hi guys,
I have put the code to create and write to a file, the code is obviously reside on server sided signed jar, which consist of the applet class code as:
String fileName = "d:/ok.txt";
String msg = "This message was written by a signed applet!!!\n";
String s ;
try {

FileWriter fos = new FileWriter(fileName);
fos.write(msg, 0, msg.length());
fos.close();
s = new String("Successfully created file :" + fileName);

}

and then compile it, and make a signed jar with the statically created class file. How can I create an applet which can use path given by client? If I will use JFileChooser, it will give the path, but how can I insert that path in the applet code , and create a compiled and signed jar which reside on the server side, so that it will run on the client side.
Please help me in this too..... please please please.
Thanking you all in advance.

Regards,
Lovelesh Saxena.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points