i can call a image file using applet.html - paramter .but its works fine by giving the full url path say (c:/temp/e.jpg).
not working for the relative
URL Path.it works for Absolute path.
eg: 1)<pram name="backgroundA" value="c:/temp/e.jpg" /> works fine
2)i have moved the .jpg file to the same folder where the applet.html present.
<param name="backgroundA" value="e.jpg" />not working, it says cant read the file are jav.
a.io.read/write permission exception
'm really facing a big problem to solve this issueu
posted 7 years ago
Welcome to JavaRanch.
For security reasons, applets can't access the local file system unless they are signed; that's why you can't use classes like File and FileInputStream.
The way to access images that are in the same directory as the HTML file containing the applet tag is to use the Applet.getImage method. See the LoadAGif example in the http://faq.javaranch.com/java/CodeBarnApplets page for how that's done.
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