simple java applet help
im following the java tutorial at their web site online. I'm having problems with these simple applets:
I compiled them fine on my other computer, but when I compiled them on the computer I am using presently, I get a problem.
the files seem to compile fine. but when i compare them with the files online, my files that i compiled are a little less in size. when i load the applet in the provided html file, all i get is a blank gray screen. and when i move the mouse over the gray screen, it says for a split second: "load: class ClickMe not found"
i have all the correct files...but after compiling the .java files, it doesn't work. the .class files on the web work fine. but my compiled files seem to be smaller than those on the web.
the ClickMe.class file i compiled is 1.45 KB (1,494 bytes)
the Spot.class file i compiled is 293 bytes (293 bytes)
the ClickMe.class file online is 1.50 KB (1,539 bytes)
the Spot.class file online is 339 bytes (339 bytes)
I beleive this size difference is caused by different compiler settings.
But that isn't the problem. Here is an example html snippet that is part of a code I use for a 'do-it-all' applet I have as a hobby project. The package i compile my classfiles into is called 'site' and this is the stucture on my server:
this code resides in a page in the public_html directory. My class files reside in the site directory:
Please have a look
codebase = "."
code = "site.SiteApplet.class"
name = "theApplet"
width = "180"
height = "900"
hspace = "0"
vspace = "0"
align = "top"
Click the 'java-dev' link.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center