Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying an Applet.

 
Jesse Miller
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a little trouble deploying my Java Applet 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:


When I run this in a browser I simply get a blank grey box, nothing ever loads. What am i missing?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ... />"
 
Jesse Miller
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Lalit Mehra
Ranch Hand
Posts: 384
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 >
</applet>

rather that what you did
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic