I have the following code:
@SuppressWarnings("serial")
public class AppletImage extends Applet {
Image picture;
public void init() {
picture = getImage(getDocumentBase(), "slider_front_img.png");
}
public void paint(Graphics g) {
g.drawImage(picture, 10, 10, this);
}
}
And I want to call it on html5 page which as the following code so far:
<!DOCTYPE html>
<html>
<head>
<meta charset="US-ASCII">
<title>Insert title here</title>
</head>
<body>
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = {
codebase : 'ProjetoICD',
code : 'AppletImage.class',
archive : 'Java2Demo.jar',
width : 710,
height : 540
};
var parameters = {
fontSize : 16
};
var version = '1.7';
deployJava.runApplet(attributes, parameters, version);
</script>
</body>
</html>
When I run it on Firefox it launches an application error saying "class not found exception". I can't find which packages may be wrong.