Here is the URL:

that does not launch below element on my browser:

<applet code="TrafficLightApplet.class" codebase="" height="225" width="350" title="undefined">You need a Java-enabled browser to see this applet. <figure><img src=""></figure> State-transition diagram for a traffic light</applet> 

I am using chrome version 43.0.2357.124

Please help me!!!

2 Answers

From the Java FAQ section.

Google announced in September 2013 plans to remove NPAPI support from Chrome by "the end of 2014", thus effectively dropping support for Silverlight, Java, Facebook Video and other similar NPAPI based plugins. Recently, Google has revised their plans and now state that they plan to completely remove NPAPI by late 2015.

As of April 2015, starting with Chrome Version 42, Google has added an additional step to configuring NPAPI based plugins like Java to run.

See the section Enabling NPAPI in Chrome Version 42 and later.

If it is still not working, check if the Java plugin is installed in Chrome. Type in the address bar: chrome://plugins/.

If the Java plugin is not listed there checkout this Stackoveflow thread How to configure Chrome's Java plugin so it uses an existing JDK in the machine.

1

Applets are deprecated but you can still run them on google chrome follow these steps:

  • Compile your java code.

    javac Hello.java

  • Create a .html file with following code:

<html> <p> This runs applet </p> <applet code="Hello.class" height=200 width=320> </applet> </html>

  • Add live server extension in VSCODE

  • Add CherpJ extension in google chrome

  • Press CTRL+SHIFT+P in vscode and enter live server and enable it.
  • Go to in chrome.
  • Click on 'Run applets' in CherpJ extension and you're done.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy