View Full Version : JApplet on web page

12-31-2011, 10:17 PM
I am trying to get my new JApplet to display on a web page, html file.

I am using NetBeans 6.9 for Ubuntu. I created a new project called "JavaApplication1", no main class. Then I added a new JApplet, with the default name of NewJApplet.java.

So I did a clean and build to make sure the JAR under the "dist" dir is fresh and new. Then I created a new HTML file in the dist dir with the new JAR and put this inside:

<applet code="JavaApplication1.NewJApplet"
width=640 height=480>

I run the file and though the grey screen comes up in Chrome, my app is not there, none of my buttons nothing, just the gray frame.

Any thoughts, what did I break? ha ha Thanks.

12-31-2011, 11:50 PM
Ok, so now it seems to be running. It seems when I open Chrome fresh to load it's page it works, if not it doesn't. Well that's not the deal now.

I am using MySQL library, when I compile the project it puts the mysql library under the lib folder in my dist folder, so should it auto load? It works when I run the project inside NetBeans. But on the page when I click on the button to load the MySQL content nothing loads.

Do I need to include this library somehow?

01-01-2012, 02:23 AM
Never mind we're good ha ha. I had to sign my app, self sign to be able to load libraries. Then I just loaded mysql.jar file in archive. We're good. Thanks.