Results 1 to 4 of 4

Thread: Applet problems

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Applet problems

    I have designed an applet which takes an address from a textfield and trys to match it with a list of addresses in a .txt file(address.txt) located in the same directory from which the applet was launched (via of course an html page on my web).

    The problem is, I keep getting a IOEXCEPTION, which i believe is related to a SECURITY problem...
    because when I try to view the html page and run the applet from Internet Explorer from my home computer, i get a Com.ms.security.SecurityAccess error

    when I upload it to my website, (running unix), i simply get a
    IOEXCEPTION error.....

    So, how do I resolve this security problem? The .txt file is located in the same directory as the applet, so shouldn't it automatically have access to it?

    Please help and explain to a newbie.

  2. #2

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    I am using this code:


    RandomAccessFile f = new RandomAccessFile("address.txt","r");

    Now, if run from a user from his home, will this
    try to create a new file on his temp directory?

    If so, how do i make the applet access the file on my
    website ...

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    I suspect that you have run afoul of the security manager. It could be the result of using a RandomAccessFile. Im pretty sure that is causing the conflict. I know Byte array streams and piped streams work without limitation in applets.

  4. #4

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    So say i convert the strings into a bytearraystream, how do I write and read that to a file?

Posting Permissions

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



Click Here to Expand Forum to Full Width