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...
Asked
Active
Viewed 681 times
-3
-
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 Answers
1
http://alcaeos.com/applet/classes/MyHomeHeating.class -> 404.
Or to put that another way.
- The applet element is telling the JRE to look for the class at the URL mentioned above.
- 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.
code="MyHomeHeating.class"
The code attribute should not include.class
.<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