I have apple.html in C:/Java1
and apple1.class in C:/Java
, I have given path of class file in applet codebase
but cannot initialize the applet.
Here is code
apple.html in C:/Java1
<applet code="apple.class" codebase="file:/C:/Java/" alt="Applet not printed value" width="200" height="200">
</applet>
apple1.class in c:/Java
import java.awt.*;
import java.awt.*;
import java.awt.Graphics;
import java.applet.*;
import java.lang.*;
public class apple1 extends Applet
{
public void paint(Graphics g)
{
g.drawString("hi...I am", 50, 50);
}
}
when I run code using
appletviewer applet.html
It gives applet not initialized.