2 Replies - 512 Views - Last Post: 07 January 2013 - 09:09 AM

#1 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Problem With Jar File/HTML File

Posted 04 January 2013 - 10:29 AM

Here's my HTML file:

<HTML>
 <HEAD>
 <TITLE>Hangman</TITLE>
 </HEAD>
 <BODY>
              <applet code="Hangman.jar" width="500" height ="200"           codebase="."            archive="file:/C:/Java/Hangman/"            alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
         >
            Your browser is ignoring the &lt;APPLET&gt; tag!
      
        </applet>

 </BODY>
 </HTML>



Here's my error:

Posted Image

No idea what to do. Can anyone help?

This post has been edited by extremeblueness: 04 January 2013 - 10:30 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Problem With Jar File/HTML File

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4361
  • View blog
  • Posts: 12,179
  • Joined: 18-April 07

Re: Problem With Jar File/HTML File

Posted 06 January 2013 - 07:12 PM

Typically your CODE attribute contains your class and your ARCHIVE attribute contains the .jar. Here is an example...

<applet code="Veterinarian" archive="Vet.jar" height="300" width="600">



Here in this jar I have one class called Veterinarian. It is a Veterinarian.class file. I am accessing that class (which is extending from a JApplet) and it is getting that class from the Vet.jar file.

So for you use Hangman (or the name of your main starting class) and then in the archive attribute put your Hangman.jar file. Give that a try.

:)
Was This Post Helpful? 1
  • +
  • -

#3 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Problem With Jar File/HTML File

Posted 07 January 2013 - 09:09 AM

Well, it runs now. Now I need to deal with my run-time errors. Thanks for the help!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1