When i try to run my program as an Applet the Applet gives me "Security Exception" for any image and Image icons in my program and does not load at all. Is there anyway by which I can set the path to the directory where my Images are Stored. Here is the Applet code I am using. <html> <title> GAME ! </title> <head> <body bgcolor="gray" text="white" > <center> <APPLET CODE="game1.class" WIDTH=600 HEIGHT=600> </APPLET><br> </center> </body> </head> Is there any modification I have to do to this Code. Please let me know Thanks a lot
Divya
Maulin Vasavada
Ranch Hand
Joined: Nov 04, 2001
Posts: 1865
posted
0
hi Divya u can make a JAR file having your applet class and images and then use ARCHIVE attribute of the Applet HTML Tag in this way... <applet code='yourapplet.class' archive='yourjarfile.jar'....> u can go to following URL for help about the Image in the applet if thats what u want... SUN Tutorial regards maulin
btw, how r u using images in ur applet? also look at the Applet API as it says that getImage() of Applet returns immediately even if the image is not loaded yet... regards maulin
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.