SCJP1.4 93%<br />SCWCD��
Originally posted by Ulf Dittmer:
You'd put the class files along with the HTML file that contains the applet tag into ...\myapp. I'm not sure where the DLL needs to go on a Windows machine, probably into a directory that's part of PATH.
In any case, you need to allow the applet to use native libraries. The two methods for doing that are described here.
SCJP1.4 93%<br />SCWCD��
Originally posted by Ulf Dittmer:
Because applets have security restrictions in what they are allowed to do. Accessing native libraries is one of the things they can't do. Appletviewer does not generally enforce these restrictions, but browsers do.
SCJP1.4 93%<br />SCWCD��
SCJP1.4 93%<br />SCWCD��
Originally posted by Ulf Dittmer:
If the images are inside of the jar file, then the browser can't access them - only the applet can read them. If you want to use them in HTML as well, then you need to keep them outside of the jar file.
Applet classes can't be anywhere inside of WEB-INF, because that directory is not publicly accessible.
SCJP1.4 93%<br />SCWCD��
Originally posted by Ulf Dittmer:
I see - by "in the browser" I thought you meant as opposed to "in the applet". But you meant as opposed to "in appletviewer".
What code are you using to access the images? Are there any exceptions?
SCJP1.4 93%<br />SCWCD��
File f = new File("main.jpg");
img = ImageIO.read(f);
SCJP1.4 93%<br />SCWCD��
SCJP1.4 93%<br />SCWCD��