0

This simple java applet below worked properly with java 6 and it is no longer works with java 8. The application is being blocked with new java security.

Java Applet Code:

import java.applet.*;
import java.awt.*; 

public class HelloWorldApplet extends Applet { 
public void paint (Graphics g) { 
g.drawString ("Hello World", 25, 50); 
} 
}

Embed HTML Document:

<html>
<body>
<applet code="HelloWorldApplet.class" width="320" height="120"></applet>
</body>
</html>

Please suggest me a way to fix this.

  • 2
    what have you tried so far? 10s google and i found this https://www.java.com/en/download/help/jcp_security.xml – Manuel Jain Aug 07 '15 at 07:20
  • Thanks. I tried it before and problem didn't solve. – Rasan Samarasinghe Aug 07 '15 at 08:27
  • 1
    1) Why code an applet? If it is due to the teacher specifying it, please refer them to [Why CS teachers should **stop** teaching Java applets](http://programmers.blogoverflow.com/2013/05/why-cs-teachers-should-stop-teaching-java-applets/). 2) Why use AWT? See [this answer](http://stackoverflow.com/questions/6255106/java-gui-listeners-without-awt/6255978#6255978) for many good reasons to abandon AWT using components in favor of Swing. – Andrew Thompson Aug 07 '15 at 11:21
  • 1
    Hi Rasan did you solve the problem I m having the same problem even still I added the applet to the Exception list – Diego Quirós Jun 12 '16 at 17:03

0 Answers0