DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004

    Unhappy 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)

  2. #2
    Join Date
    Nov 2004
    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:

      codebase = "."
      code     = "site.SiteApplet.class"
      name     = "theApplet"
      width    = "180"
      height   = "900"
      hspace   = "0"
      vspace   = "0"
      align    = "top"
    Please have a look

    Click the 'java-dev' link.
    eschew obfuscation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.