how to run a java applet in web browser

saroj picture saroj · Mar 29, 2012 · Viewed 89k times · Source

I have a java SE project or you can say applet, but i want to run this applet in web browser how is it possible?

I need to copy jar file something like this i came to know but what is the possible solution?

Answer

teukkam picture teukkam · Mar 29, 2012

This tutorial pretty much covers everything from writing your applet to embedding it on your web page. If you already have your applet done, as it seems, scroll down to "Invoking an applet". Here's the code from the tutorial for a quick solution:

<html>
<title>The Hello, World Applet</title>
<hr>
<applet code="HelloWorldApplet.class" width="320" height="120">
If your browser was Java-enabled, a "Hello, World"
message would appear here.
</applet>
<hr>
</html>