I use a gif picture in my applet,and put the gif and the myapplet.class in the same directory,it is ok! but when i move the gif picture to another directory,i don't know how to use the policytool in window2000,it always show "can not access the C:\\??\\??\\??.gif",how could i deal with it?
Hi Daneil I guess you currently don't need Policy Tool if you are not getting SecurityException but I have some ideas, 1. You should prepare a JAR file for the applet where you put your appelt 2. You should put your images in that JAR file and access it using this.getClass().getResource("/myimage.gif"); wherever you want to use it 3. You should avoid accessing image on the local machine's Absolute path as the applet won't work when you upload it to the server and then from there access it via the browser as you can't know (or enforce) actual path to that image anymore.. This way you will avoid future problem and current as well I guess... Let us know if this getResource() thing seems monster to you.. Regards Maulin
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads