A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Deploying an Applet.
Joined: Apr 05, 2010
Jun 18, 2010 13:23:53
I am having a little trouble deploying my Java
that I created in NetBeans IDE. So, to start I have my applet in NetBeans and I have it build my JAR file called LabStats.jar.
The JAR file has three sub folders when unpacked (META-INF, labrecon, labstats). My applet is in labstats and is called Applet.class.
So, my HTML file looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <applet code="labstats.Applet.class" name ="Applet" archive="LabStats.jar" width =880 height=610 /> </body> </html>
When I run this in a browser I simply get a blank grey box, nothing ever loads. What am i missing?
Joined: Mar 22, 2005
Jun 18, 2010 15:41:47
There are usually messages in the Java Console if something goes wrong. Also try splitting the applet tag into starting and ending tag ("<applet ... > </applet>" instead of ("<applet ... />"
Ping & DNS
- my free Android networking tools app
Joined: Apr 05, 2010
Jun 18, 2010 15:57:44
I have looked for messages in the Java Console but there are no errors. I just tried splitting the starting and ending tag but the result was no different. Anything else?
Joined: Jun 08, 2010
Jun 19, 2010 00:51:58
first of all i do not know how you managed to name your file Applet.class as you actually need to extend Applet for performing any applet related tasks ...
anyways try using ...
<applet code="labstats.Applet" name ="Applet" archive="LabStats.jar"
width =880 height=610 >
rather that what you did
subject: Deploying an Applet.
HTML wont run Applet
The import cannot be resolved
Applet jar file,use of archive in applet help
Applet Deployment / Netbeans / Commandline
My java applet program does not appear in appletviwere!!!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014