Applet Atachment Problem

Web Page will not load the applet

Page 1 of 1

7 Replies - 492 Views - Last Post: 17 August 2009 - 07:04 PM Rate Topic: -----

#1 painkiller102  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 15
  • View blog
  • Posts: 281
  • Joined: 27-February 08

Applet Atachment Problem

Posted 16 August 2009 - 01:08 PM

well i have made a pretty big project that involves an applet. I made a web page for the applet and attached the applet to the web page using the following code:
<applet code="The_Programmers_Cafe_Sign_Up/Main.class" archive="The_Programmers_Cafe_Sign-Up.jar" width="575" height="475">
</applet>



The applet doesn't error out, yet the web page is blank as if the GUI is never loaded? Any help would be greatly appreciated!

Additional Information if needed:

the webpage and the jar that contains the applet are in the same folder (web) however there is also another folder that contains all the class files, this folder is called: "The_Programmers_Cafe_Sign_Up".

This post has been edited by painkiller102: 16 August 2009 - 01:08 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Applet Atachment Problem

#2 Gloin  Icon User is offline

  • Expert Schmexpert...
  • member icon

Reputation: 235
  • View blog
  • Posts: 4,489
  • Joined: 04-August 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 02:30 PM

Is it possible the jar-file has the wrong name? I notice one of the underscores is a -

Sign-Up.jar

This post has been edited by Gloin: 16 August 2009 - 02:32 PM

Was This Post Helpful? 0
  • +
  • -

#3 painkiller102  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 15
  • View blog
  • Posts: 281
  • Joined: 27-February 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 02:34 PM

View PostGloin, on 16 Aug, 2009 - 01:30 PM, said:

Is it possible the jar-file has the wrong name? I notice one of the underscores is a -

Sign-Up.jar


The jar name is correct. And yes it is odd that i never put an underscore there :) However i knew that when writing the HTML portion of the applet as well
Was This Post Helpful? 0
  • +
  • -

#4 Gloin  Icon User is offline

  • Expert Schmexpert...
  • member icon

Reputation: 235
  • View blog
  • Posts: 4,489
  • Joined: 04-August 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 02:39 PM

From Suns homepage,

Quote

Unfortunately, not all browsers understand the same archive format or use the same HTML code to specify the applet archive. Watch this page for the latest information about browser support for archives.


http://java.sun.com/...pplet/html.html

Could be a browser problem?
Was This Post Helpful? 0
  • +
  • -

#5 painkiller102  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 15
  • View blog
  • Posts: 281
  • Joined: 27-February 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 03:17 PM

View PostGloin, on 16 Aug, 2009 - 01:39 PM, said:

From Suns homepage,

Quote

Unfortunately, not all browsers understand the same archive format or use the same HTML code to specify the applet archive. Watch this page for the latest information about browser support for archives.


http://java.sun.com/...pplet/html.html

Could be a browser problem?


No indeed it was not a browser problem but thanks for the interest and help! I have figured out the problem, apparently java just happened to not jar the classes correctly (some sortof fluke i guess) but when i made a new jar and replaced all the classes in the webs classes folder and redid the entire Web page code to host the applet it worked!
Was This Post Helpful? 0
  • +
  • -

#6 Gloin  Icon User is offline

  • Expert Schmexpert...
  • member icon

Reputation: 235
  • View blog
  • Posts: 4,489
  • Joined: 04-August 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 03:24 PM

Can't believe I didn't see that one.. ;)
Was This Post Helpful? 0
  • +
  • -

#7 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8328
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Applet Atachment Problem

Posted 16 August 2009 - 06:31 PM

Applets call the init() stop() start() methods of a class that extends JApplet
do you have these methods implemented

this line:
code="The_Programmers_Cafe_Sign_Up/Main.class"

does not make sense
it should describe the package and class that extends JApplet at least
code="The_Programmers_Cafe_Sign_Up.Main.class"

if you have

package The_Programmers_Cafe_Sign_Up;

class Main extends JApplet {

	 void init() {
....



*Edited should be |methods" not "classes"

This post has been edited by pbl: 17 August 2009 - 09:44 PM

Was This Post Helpful? 1
  • +
  • -

#8 painkiller102  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 15
  • View blog
  • Posts: 281
  • Joined: 27-February 08

Re: Applet Atachment Problem

Posted 17 August 2009 - 07:04 PM

View Postpbl, on 16 Aug, 2009 - 05:31 PM, said:

Applets call the init() stop() start() methods of a class that extends JApplet
do you have these classses implemented

this line:
code="The_Programmers_Cafe_Sign_Up/Main.class"

does not make sense
it should describe the package and class that extends JApplet at least
code="The_Programmers_Cafe_Sign_Up.Main.class"

if you have

package The_Programmers_Cafe_Sign_Up;

class Main extends JApplet {

	 void init() {
....



Thanks for that post! I realized on the new version i did today that i forgot to include the "package The_Programmers_Cafe_Sign_Up;" code in all of my classes! That created quite a bit of frustration however everything works as planned now! THANKS A BUNCH! OH and by the way:

code="The_Programmers_Cafe_Sign_Up/Main.class"

works as well as:

code="The_Programmers_Cafe_Sign_Up.Main.class"

I tried them both and it seems that either way will work in creating an Applet for a web page!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1