Reputation: 321
<html>
<head>
<title>Applet</title>
</head>
<body>
<applet code="Main.class" archive="Applet1.jar" WIDTH=400 HEIGHT=400></applet>
<object codetype="application/java" classid="java:Main.class" archive="Applet1.jar" width="400" height="400"></object>
</body>
This is the code I have used in my HTML file. Tried both applet and object (together and apart) and still no go. However, on Eclipse, my applet is able to work via the applet viewer. I've tried both Firefox and Chrome (and Microsoft Edge), but it's the same case for all of them - the applet simply does not show up on the browser. If I add text to the HTML file, it will appear at the very top left of the screen, so it's not like my browser is blocking and disallowing the applet to configure (I don't think so anyways).
What's the problem? I searched this question on the web and most of them were quite outdated and didn't provide enough information anyways. Any assistance would be much appreciated.
(And yes, my Applet1.jar and the HTML file are in the same folder).
Upvotes: 0
Views: 2213
Reputation:
Most modern web browsers -- including current versions of Chrome, Firefox, and IE Edge -- no longer support Java applets.
Depending on what your applet does, you will need to either reimplement it in Javascript, or convert it to a downloadable Java application.
Upvotes: 1