Help figure out why my applet won't run on my Mac.
May 19, 2008 10:27 PM Subscribe
Why would an applet work fine on my school's Windows computers, only to throw "java.security.AccessControlException: access denied (java.io.FilePermission filename.gif read)" when I attempt to run it on my Mac? This is using a lot of Java stuff I'm quite unfamiliar with, so be prepared to talk down to me. The thing-I-don't-understand in question is mostly something called MediaTracker, if that rings any bells. Many more details inside and upon request.
posted by MadamM to Computers & Internet (7 answers total)
So, I'm working on a CS project (I'm in my second year of HS computer science) that basically involves creating our own game. Fun little end of semester project, except we're running short on time (AP/IB exams for me and my partner got in the way). Our teacher provided us with a base framework for dealing with applets and images and threads and such which makes things look nicer, but which are nothing we're familiar with. I can *use* all this unknown stuff, but fixing it is beyond me. Currently, our program (such as it is) runs fine on the computers at school, using whatever applet viewer JCreator uses (I assume nothing special?) When I try to open the HTML file with the applet at home in Firefox, I get the error message I wrote out before. Same thing happens in Safari. The problem (based on the Java console I found in the Firefox Web Developer extension) is on this line:
myImage = Toolkit.getDefaultToolkit().getImage("filename.gif");
I am happy to look for and copy out anything else, including the full error console readout, but I am hesitant to just put the whole dang thing up because frankly I would imagine it's overkill. The main thing is it works fine a school; I just can't figure out what's wrong with it at home. Incidentally, the reason I want it to work on my laptop so bad is so I can work on it more easily outside of class. I'll probably go kick my brother off our home Windows desktop (and will report back if that solves/doesn't solve the problem), but for the future mobility => maximized workin' time. So thank you a thousand times if you can figure this out for me, as googling has simply made me more aware of how far above my head I am working.