When I run my html file, it gives me this error:
noclassdefFoundError, applet(wrong name:testapplet/applet) details
Java Plug-in 10.65.2.20
Using JRE version 1.7.0_65-b20 Java HotSpot(TM) Client VM
applet.class and applet.html are in the same folder: \testapplet\bin\testapplet
.
Applet code:
package testapplet;
import java.awt.Graphics;
import javax.swing.*;
public class applet extends JApplet
{
public void paint(Graphics g)
{
g.drawString("Acesta este un applet",320,180);
}
}
Html code:
<html>
<head>
<title>Applet app</title>
</head>
<body>
<embed type="application/x-java-applet;version=1.7"
width="512" height="512"
code="applet.class"
/>
</body>
</html>