Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6786885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:17:55+00:00 2026-05-26T17:17:55+00:00

I just started writing Applets and I had some questions about the HTML applet

  • 0

I just started writing Applets and I had some questions about the HTML applet tags with packages, and class files.

I’ll start with packages. I’ve been using Netbeans to code my applets, which includes a package automatically. The applet runs fine in the Netbeans applet viewer, and the HTML is displaying everything it should except the applet – there’s just a white box that says “Error.” When I re-compiled using Eclipse without the package, the HTML display the applet fine. I tried everything I could think of, but I could not for the life of me get the applet to work with the package.

<applet code="myClass.class"width="500"height="500">

<applet code="myPackage.myCLass.class"width="500"height="500">

<applet code="myPackage\myClass.class"width="500"height="500">

Nothing worked. So, my first question is this: what should my HTML applet tag path say in order to get to an applet which is contained in a package? Honestly, all of my google searches yielded results that I didn’t really understand, as I’m not 100% sure what a package is/does.

Which brings us to my next question: class files. The applet tag points a a class file, i.e., a compiled source file. Compiling a .java file creates a .class file, simple enough. But how does one get from an applet java file to an applet class file? Attempting to compile via the command line or any IDE fails, because there’s no main method. So far, the only way that I’ve been able to get a class file for an applet is to compile the code either using Netbean’s applet viewer or “Run as an applet” in Eclipse. Is there another way to obtain the class file? Or do I have to compile using an applet emulator (for lack of a better word)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:17:56+00:00Added an answer on May 26, 2026 at 5:17 pm
    <applet code="myPackage.myCLass.class"width="500"height="500">
    

    As to the applet element for a myClass applet class in the myPackage package.

    1) An applet element should have spaces between the attributes (I’m not sure if that is part of the W3C recommendation, but it just looks weird).

    <applet code="myPackage.myCLass.class" width="500" height="500">
    

    2) The code attribute should be the fully qualified name of the class, which means:

    <applet code="myPackage.myCLass" width="500" height="500">
    

    3) With no archives and no codebase specified, the JRE would look for the class in the myPackage sub-directory of the directory from which the HTML is loaded. E.G. if the HTML is called applet.html and is located at:

    • http://oursite.com/product/applet.html

    The class would need to be located at:

    • http://oursite.com/product/myPackage/myCLass.class

    Once you think you have the applet class correct, try fetching it using the address in the browser address bar. If the class is not offered for download, the JRE won’t be able to load it either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using subclipse for my class projects after a re-writing half of
I've just started learning Emacs, and decided to start writing Python in it. I
Heyo, Just started writing an assembler for the imaginary computer my class is creating
I have just started writing my own JavaScript Framework (just for the learning experience),
I'm looking for a fuzzy date algorithm. I just started writing one and realised
I'm just getting started on writing functions instead of writing everything inline. Is this
I have just started learning Jquery and am new to writing javascript (I am
I have just installed C# 2008 Express Edition 2008 and started writing code. My
Just started my first MVC 2.0 .net application. And I set up some default
I've just started writing on a component where I found it might be useful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.