-3

Can anyone help me out. I've written a program that controls the heating system in an imaginery house, an applet actually. it runs fine in netbeans but i cant get it to run as an applet in a browser, can anyone help me out please, I linked to a zip folder of all my code...

http://dl.dropbox.com/u/47863/Heating%20System.zip

kev670
  • 810
  • 2
  • 18
  • 37
  • Please post your pertinent code and your html code *here* as well as any error messages found in the Java Console of your browser. – Hovercraft Full Of Eels Oct 18 '11 at 22:15
  • *"I linked to a zip folder of all my code..."* Can you upload the applet to somewhere on the net where we can see it break? BTW - are you checking the Java Console for errors? – Andrew Thompson Oct 18 '11 at 22:17
  • I Uploaded the files to alcaeos.com/applet i was wondering if someone could compile my code and have a look and see why it might not work. i do have the myheatinghome class extending japplet and it runs in netbeans. not sure what the problem is really – kev670 Oct 18 '11 at 22:50

2 Answers2

1

http://alcaeos.com/applet/classes/MyHomeHeating.class -> 404.

Or to put that another way.

  1. The applet element is telling the JRE to look for the class at the URL mentioned above.
  2. The class is not at that location. (Neither is it in the same directory as the HTML.)

Where is the class file?


BTW: Typical bloody Netbeans generated code (/HTML). When what it generates is not invalid, it is redundant.

  1. code="MyHomeHeating.class" The code attribute should not include .class.
  2. <HR WIDTH="100%"> An HR element normally spans the entire width of the page.
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
0

You need to compile your applet into .class files (not .java files like you have in the ZIP; those are source code) and embed it into an HTML page. You can use the tag in HTML to do these; read more here: http://www.echoecho.com/applets01.htm

Hayden Schiff
  • 3,280
  • 19
  • 41
  • i just wanted to show the source. yes i turned it into classes and then uploaded it. its at alcaeos.com/applet – kev670 Oct 18 '11 at 22:51