Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How to add applets to HTML?

I am using the following code in an attempt to create an html page with an applet:

<html>

<head>

<title>Test</title>

</head>

<body>

<applet code="Test.class" height=400 width=400></applet>

</body>

</html>

I tried moving the html file into the same folder as Test.class, but using this code the html file is unable to locate the java program. Is the code itself wrong, or where to I need to move the html file for it to locate the program?

1 Answer

Relevance
  • Chris
    Lv 7
    7 years ago

    Try this:

    code="Test"

    Apparently, you have to omit the ".class" part.

Still have questions? Get your answers by asking now.