How do I add a java program to a weebly site?
<p>I'm experimenting with Weebly, and I'm currently trying to add an arbitrary swing program to the Weebly editor. I have tried two approaches thus far, as shown here:</p>

<p>1: (Note: - replaces &lt; and >)</p>

<pre><code>-embed height=400 width=400 src="siteName/uploads/someNumbers/testapplet.class"--/embed-
</code></pre>

<p>2: (Same substitution as above)</p>

<pre><code>-applet codebase="siteName/uploads/someNumbers" code="testapplet.ckass" width=400 height=400--/applet-
</code></pre>

<p>Upon publishing and viewing the page, the first one says I need a plugin to display the content, and the second one says my security preferences won't let me run java on the site, whereas I can run java pretty much everywhere else just fine.</p>

<p>What should I do to make this work? This could include some of the following:</p>

<ol>
<li>Modifying my program (i.e. the java code itself)</li>
<li>Modifying how I upload the program (i.e. .class vs .jar)</li>
<li>Modifying how I display the program (i.e. the actual -applet- or -embed-)</li>
</ol>

<p>For reference, here is the java code- just a basic JButton and JLabel, with the JLabel's value increasing upon each click of the button:</p>

<pre><code>import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TestApplet extends JApplet
{
   static int x = 0;
   static JLabel l = new JLabel(x+"");
   public void init()
   {
      setLayout(new FlowLayout());
      JButton b = new JButton("Button");
      b.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
            x++;
            l.setText(x+"");
         }
      });
      add(b);
      add(l);
   }
}
</code></pre>