Results 1 to 4 of 4
Hiya,
Could anyone possibly tell me how I could go about testing a java applet in a web browser before deploying it? I have a short application I want to ...
- 05-11-2007 #1
Testing Java Applets in a Browser
Hiya,
Could anyone possibly tell me how I could go about testing a java applet in a web browser before deploying it? I have a short application I want to test, but I cannot get it to work in Firefox.
When i try to run it either locally, or through apache, I get the following output in the Java console:
I Tried checking the firefox security settings and java is enabled. I could not find anyplace to let it know that its okay to work with files. I Also tried checking google but have not had any luck just yet.Code:java.security.AccessControlException: access denied (java.io.FilePermission image/logo.gif read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) . . .
Anyone have any suggestions?
Thanks,
- 05-12-2007 #2
Are you positive your code is good? It seems as if you are having some permission problems.
Have you tried appletviewer to view your applets (it comes with the sun jre)?Looking for a distro? Look here.
"There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
Queen's University - Arts and Science 2008 (Sociology)
Registered Linux User #386147.
- 05-12-2007 #3
I seem to recall that Java applets cannot access any files...
Aha. From the Java Sun FAQ (Applet Security):
EDIT:3. How do I let an applet read a file?
Applets loaded into a Java-enabled browser can't read files.
Sun's appletviewer allows applets to read files that are named on the access control list for reading.
This seems to refer only to the remote system. Try adding the image into the JAR file itself and see if you can access it that way.DISTRO=Arch
Registered Linux User #388732
- 05-12-2007 #4
Okay. I did try the
and it was able to run the applet, however the appearance of the GUI was distorted, and some of the buttons were unaccessible, so i gave up on it. I Will check out the post, and also try loading the images into a .jar file.Code:appletviewer
Thanks for the input!


Reply With Quote