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 795689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:31:11+00:00 2026-05-14T22:31:11+00:00

I’m creating a Java applet from a large scale pre-existing project (Vizster). I am

  • 0

I’m creating a Java applet from a large scale pre-existing project (Vizster). I am using NetBeans 6.7.1 with JDK 1.5 on Mac OS X.

I am attempting to run the applet from it’s single output .jar file, but when I do this, it says “applet loaded” at the bottom of screen in Firefox, and there is nothing in the java console, but nothing shows up in the window for the applet. I have had different errors in Firefox previous to this, including errors such as “appletNotLoaded:ClassDefNotFoundError” and also security errors, but there is never any output in my java console. Here is the html file for the applet:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <applet codebase ="." code="zuve.ZuveApplet.class"
            archive="ZuveApplet.jar"
            height="1000" width="1000"/>
  </body>
</html>

Where zuve.ZuveApplet.class is where my main method is located, and “ZuveApplet.jar” is the name of the output jar file. Here is ZuveApplet.java, the main method class:

package zuve;

import vizster.Vizster;
import vizster.VizsterLib;
import java.applet.Applet;

 public class ZuveApplet extends Applet {
     public static final String DEFAULT_START_UID = "186297";

     @Override
     public void init() {
        new Vizster();
     }

    public static void main(String[] argv) {
        VizsterLib.setLookAndFeel();
        //String startUID = argv.length > 0 ? argv[0] : DEFAULT_START_UID;
        String startUID = DEFAULT_START_UID;
        String file = argv.length > 0 ? argv[0] : null;
        new Vizster(startUID, file);
    }
 }

The applet runs perfectly well as a standalone (not embedded in html), but I need to embed it. The “Vizster” object is an extension of a JFrame, so I figure I should just be able to create an instance of it and add it to an applet. Might it be much more complicated than this?

I’m new to java and applets in general unfortunately. I have seen a lot of forum posts about source tree structure being an issue, so:

1)is it a problem that I am using multiple packages? They are all in the src directory of my project.

2)is there anything I need to be placing in my java home directory? I know a lot of people have classpath issues, but I am using a modern IDE which I thought took care of all that for me.

3)when importing my project into a NetBeans Java Web Application project, should I be adding the applet to the project as a .jar, or should I add the whole project?

4)Originally when I had created this applet, I just had my few source files and a bunch of .jar libraries as dependencies, but when I inspected the output .jar, all I saw were the compiled source files. There was no trace of the files from the libraries. Is this how it should be? I noticed that if I moved the output .jar from its containing folder, it could no longer run standalone. I thought that .jars were supposed to be self contained, is this not true? Is there anything I should know about making an executable jar?

5)on a side note, does the size of the applet denoted in the applet tags in the html have to exactly match the size of the applet itself?

Sorry for the enormous post, and the incredibly vague problem, I am working with a team in which nobody knows anything about applets or Java (real brilliant of us, I know). Any sort of help or general suggestions would really help.

Thank you!

  • 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-14T22:31:11+00:00Added an answer on May 14, 2026 at 10:31 pm

    You can specify multiple jars in the archive attribute:

    <applet codebase ="." code="zuve.ZuveApplet.class"
            archive="ZuveApplet.jar,thing.jar,anotherThing.jar"
            height="1000" width="1000"/>
    

    A JFrame is a top-level container, so you won’t be able to add it to your applet. You can have your applet create an instance of your object and let it open its own window. A more flexible approach would be to refactor your object into a JPanel. As a JPanel, it can be added to a JApplet, or to a JFrame if you also want to support running it as an application.

    Also take a look at JNLP as that lets you deploy your code as an applet or as an application and also provides APIs for printing and local file access. Functionality not available to simple applets.

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

Sidebar

Ask A Question

Stats

  • Questions 439k
  • Answers 439k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In Haskell, it is easy to define a function to… May 15, 2026 at 5:03 pm
  • Editorial Team
    Editorial Team added an answer You just need an alias for the column name. Since… May 15, 2026 at 5:03 pm
  • Editorial Team
    Editorial Team added an answer Update: A possible workaround is at this SO answer. Essentially… May 15, 2026 at 5:03 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.