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
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.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop