text file accessing in Applet

Discussion in 'Java' started by vidhi, Jan 30, 2006.

  1. vidhi

    vidhi Guest

    i have an applet application which runns by useing values avilable in a
    text file, as per the situation it rung great.
    but the problem occures when multiple instance of applet over a network
    is running and try to access the text file at same instance, in this
    situation only one applet can have access the file and rest are hang up
    at line which uses the file, one the applet file which have file access
    grant will close then next but only one at this time also get the
    access to that file.
    i thought i might be sharing vocation problem.
    here is the code what i use to access.

    BufferedReader br=new BufferedReader(new
    InputStreamReader(getClass().getResourceAsStream("MyTextFile.txt")));
    try
    {
    while((str=br.readLine())!= null)
    {
    strRange=br.readLine();
    }
    }catch(IOException io){}
    vidhi, Jan 30, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Love

    applet vs. canvas in applet

    Rob Love, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    616
    Liu, Chunyen
    Jul 7, 2003
  2. webster
    Replies:
    0
    Views:
    850
    webster
    Jul 20, 2003
  3. Sajjad Lateef
    Replies:
    3
    Views:
    3,436
    frére Ane
    Jun 19, 2012
  4. Krista
    Replies:
    3
    Views:
    2,314
    Andrew Thompson
    Sep 15, 2004
  5. vidhi
    Replies:
    1
    Views:
    543
    Matt Humphrey
    Jan 30, 2006
Loading...

Share This Page