> why when i run an applet whith eclipse this can write
> in a file and when i run it in a html file it can't
> write in file
You should read up on applets, the sandbox and the regarding security considerations. In order to allow your applet to write to disk, you need to have its jar signed.
(Sounds like a synonym for dying... "he finally had his jar signed".)