How can i overcome this problem...in applet

my applet will read in a file for data,
when i compile using JCreator, it work...
but when i open the html file to run, problems occur,
state that loading java applet failed.
the message shown in java console:
java.security.AccessControlException: access denied (java.io.FilePermission data.dat read)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkRead(Unknown Source)
     at java.io.FileInputStream.<init>(Unknown Source)
     at java.io.FileInputStream.<init>(Unknown Source)
     at java.io.FileReader.<init>(Unknown Source)
     at Reader.<init>(Reader.java:9)
     at Puzzle.init(Puzzle.java:30)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
thanks a lot for help

As I said, you need to read it from the server. Exactly how depends on what kind of data it is. If it's always going to be the same for the program then treat it as a "resource". If it's apt to change without rebuilding the program then serve it as a regular file, and access it via. a regular URL.
Say it's a resource, place it in the same directory as the .class file that loads it and do:
InputStream ds = getClass().getResourceAsStream("data.txt");
Reader r = new InputStreamReader(ds);
BuffererdReader br = new BufferedReader(r);

Similar Messages

Maybe you are looking for

  • ITunes 11: No longer able to sync via USB

    I updated to the latest version of ITunes.  I am now no longer able to sync either my iPod Nano nor iPod Touch via USB.  When trying to copy music from the computer to either devices, the progress is extremely slow for the 1st song and then stopps wh

  • Massive memory consumption resulting in massive page file

    Platform: Windows XP on Dell precision M60. I GByte RAM, Oracle 10g (10.0.2), Oracle Http Server, APEX 3.1.1 Have a page which runs sql query .. select AS_SEEN_ON_ACW(:P51_MESSAGE, :P51_text_col, :P52_backgnd_col) AS "TEXT" from DUAL The functions in

  • Iweb/ computer to computer transfer/ publish error

    Problem with iWeb 09 and in particular publishing on my Blog. Today I decided to try and shift my iWeb site to a 2nd computer, from my iMac to my MacBook. Both have been installed up to date with all the latest software updates. I moved the domain.si

  • Menu/List in new window

    I have a list/menu on my site and you pick the template you want and then hit go and it opens the page where that template is. How do i get it so that it opens up the page in a new window, I dont see anywhere to put _blank in?

  • Ignore a group of faces

    After upgrading to Photos you still can't ignore a group of faces.  In addition my entire photo library was rescanned and now I have to ignore faces all over again.  Also I have no idea how many faces have yet to be identified.