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

  • Home
  • SEARCH
  • 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 9192263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:52:48+00:00 2026-06-17T20:52:48+00:00

I build project in eclipse – swing applet and now I’m trying to run

  • 0

I build project in eclipse – swing applet and now I’m trying to run it in a browser.

I have 3 packages, let’s say they are called: “pkgApplet”, “pkgFirst”, “pkgSecond” with .class files. In pkgApplet I have class “main” with method main(). No matter what I do, I can’t run this applet in browser. Currently my html code looks like this

<applet code="bin/pkgApplet/main" height="1000" width="1000"/>

Browser gives this error every time no matter how I modify applet tag:

NoClassDefFoundError with message bin/pkgApplet/main(wrong name: applet/main)

I tried using codebase attribute, packing applet into .jar file and using archive attribute, but nothing seems to work. Do you have any idea what am I doing wrong?

  • 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-06-17T20:52:49+00:00Added an answer on June 17, 2026 at 8:52 pm

    Your applet format should be:

    <applet codebase="bin" code="pkgApplet.main" height="1000" width="1000"></applet>
    

    bin is the default target directory (for Eclipse) so will require the codebase attribute as shown above. For this to work, your HTML file needs to be located in your project directory.

    Note classes in Java start with uppercase, while package names are lowercase. Also its helpful to name classes describing what they do. You could have instead:

    <applet codebase="bin" code="pkgapplet.MyMainApplet" height="1000" width="1000"></applet>
    

    Do you realize that nothing in main will be called by your applet client? Any startup functionality should be placed in the init method.

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

Sidebar

Related Questions

Scenario Let's say I have an Eclipse workspace with Project A, Project B, and
I'm trying to build a project in Eclipse with Maven. However I get the
I'm trying to build a project with a specific compiler in Eclipse, and I'm
I'm trying to build a medium-size project in Eclipse. It consists of main app
I have maven java project in eclipse. I right click project, choose Build project
I'm trying to build a Flex project in Eclipse on a client's machine, I
I am loosing my mind trying to build my NDK project from eclipse using
I have this project on Eclipse 3.7 (Indigo) and planning to build the *.jar.
I have created a local Groovy project in Eclipse. I am now starting to
I am trying to assign a keyboard shortcut to Build Project in Eclipse Juno

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.