Hi,
 
You have to use URL format to load your image file, so you can not use directly the file name in applet, which is just valid in application. And the path is specified with the class file. I give the example as follows:
 
java.net.URL urlimage = new java.net.URL(getCodeBase().toString() + "image.jpg");
 
where, the image file "image.jpg" is same subdirectory with you applet class file. Additionaly, all image files must be set to read attribute.
 
Rgds,
 
Cheng Chang Dong 
----- Original Message -----
Sent: Saturday, January 26, 2002 3:34 PM
Subject: [JAVA3D] problems with win2k server and loading files

I am having problems trying to load files via a URL on my local webserver.  If I type the name of a resource, say http://localhost/somedirectory/image.jpg I can view the resource with a webbrowser, but when I try to load it through a java applet I get a 401 permission denied error.
 
Thanks for any help

Reply via email to