JiiPee
unread,Nov 8, 2014, 7:23:22 AM11/8/14You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am quite new to Java. I have downloaded a tictac example Java code and
I run it on Eclipse with no problems. But when I try to test it outside
Eclipse by doing the following:
I copy the .class file and two gif-images to another location and call
the Java from html code:
<applet code="hello/HelloWorld.class" WIDTH="300" HEIGHT="300">
And I put the two gif-files to hello/images folder,
I get and error:
AccessControlException
access denied ("java.io.FilePermission")
"\I:\Important\Programming\WebProgramming\hello\images\not.gif" "read")
The path seems to be correct. I load the pictures from the Java code by:
notImage = getImage(getCodeBase(), "images/not.gif");
If I draw (drawLine) the X and O instead of using gif, then it works....
so its really the gif-loading which is the problem.
I have Windows XP. I also tried it to run inside XAMPP server folder in
my machine but the same problem.
Does anybody know how could I fix this problem to be able to run it on
my machine?
Thank you.