yet again i am at a stand still in my applet ><
but this time i know exactly the problem and what i need
to know to fix it
i need to know how to load a image from a url w/o
being slapped in the face with a security exception
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
yet again i am at a stand still in my applet ><
but this time i know exactly the problem and what i need
to know to fix it
i need to know how to load a image from a url w/o
being slapped in the face with a security exception
Programming: the art that fights back
.... nothing ?
not even info on how to use the java securityManager?
Programming: the art that fights back
Can you ship the image with the applet in a jar? This would overcome the security exception and you can load the image from your app. If you must load it externally, you most likely will have to sign the applet (buy one or see Signed Applets - How to sign an applet (and get it to work) ).
Loading the image from the app:
URL url = getClass().getResource("/image.jpg");
where the path of the image is inside your jar and relative to your class/package.
while the first 2 ideas would work it would either make the html or the jar huge , as i need to be able to load over 5000 diffrent pics ( only 2 active at once depending on the choices made ) i have signed the applet but i'm still having problems loading pics with it . link to the applet
i saw a way similar to that but decided to go with the full url instead
do u know if this would work w/o needing signing ?
URL url = new URL(//somthing that returned the applets url + /relative path& location of pic);
the entire thing is setup as
page | --Applets | |--- .jar --- resources | --- pics | --- pic type ( many of these ) | --- pic ( about 30 in each above folder )
Last edited by wolfgar; April 6th, 2010 at 12:02 AM.
Programming: the art that fights back
Off the top of my head no. Is there any way to decrease the number of images? I briefly looked at the applet, didn't see any images show up but based upon the selections my guess is you could somehow overlay the colors onto a 'template' image which - if possible - could reduct the number of images considerably
if i was the 1 that made the images i could , but i just DL the images from ernya ( the place i made the shop to work for )
Programming: the art that fights back