Results 1 to 4 of 4
  1. #1
    mitra is offline Member
    Join Date
    Jun 2011
    Posts
    59
    Rep Power
    0

    Default Local file read & write from applet through browser

    Hi everybody.............

    I have a problem with applets.

    I have write a program that creates new .txt file at my local system(d:\myProgram\accessFile\new.txt) with some pre-defined text.
    And after the creation of txt file, I have read the file and shows the content over a textArea.
    All works fine when I run this program from appletviewer or run from netbeans.
    But if I try to run this program from browser nothing happened. Means nothing happend, just GUI appears but no txt file creates in the specied directory.

    So, what should I do?

    Thanks .......

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: Local file read & write from applet through browser

    See What Applets Can and Cannot Do (The Java™ Tutorials > Deployment > Java Applets)
    Look at the exceptions being thrown. If it is a SecurityException (I can say with confidence that it is), sign the applet.

  3. #3
    mitra is offline Member
    Join Date
    Jun 2011
    Posts
    59
    Rep Power
    0

    Default Re: Local file read & write from applet through browser

    thanks doWhile for your information.
    But I read this before, and signed the applet.
    I followed this link for create sign applet --- " Chapter 10: Signed Applets "
    But still I can't write or read file from local system during the execution in browser. Although it works fine from appletviewer.
    So, if u have any program that can aacess files while executing in browser, please let me know.


    Thanks...

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default Re: Local file read & write from applet through browser

    Are there any error messages in the browser's java console?

    For my private applets, I give the applet permission by using the policytool to change the .java.policy file.

Similar Threads

  1. How to read xml file located in local system using Java
    By java_kick in forum Advanced Java
    Replies: 2
    Last Post: 04-06-2009, 11:28 PM
  2. Replies: 5
    Last Post: 02-05-2009, 10:28 AM
  3. Replies: 5
    Last Post: 01-20-2009, 09:08 AM
  4. Read and Write file
    By mrdestroy in forum New To Java
    Replies: 13
    Last Post: 10-31-2008, 12:11 PM
  5. Replies: 0
    Last Post: 11-14-2007, 06:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •