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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:19:18+00:00 2026-05-23T08:19:18+00:00

I’m trying to make an applet with jPCT. Using jPCT requires that the jPCT

  • 0

I’m trying to make an applet with jPCT. Using jPCT requires that the jPCT jar be added to the classpath. I thought I had it, but I’m still getting a class not found exception about one of jPCT’s classes.

My commands:

$ javac -classpath /var/www/html/jpct.jar:.  /var/www/html/HelloWorld.java
$ jar cf /var/www/html/HelloWorld.jar /var/www/html/HelloWorld.class

My HTML:

<html>
    <head>
        <title>Hello World</title>
    </head>
    <body>
        <applet code="HelloWorld"
              width=640
              height=480
              archive="http://applet/HelloWorld.jar,http://applet/jpct.jar">
        </applet>
    </body>
</html>

I’m using Apache and I have verified that my jars are downloadable from the URLs in my code.

The exact error message:

$ firefox http://applet/HelloWorld.html
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK Server VM (build 20.0-b11, mixed mode)

(firefox-bin:15296): LIBDBUSMENU-GTK-CRITICAL **: dbusmenu_menuitem_property_set_shortcut: assertion `gtk_accelerator_valid(key, modifier)' failed
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
java.lang.NoClassDefFoundError: com/threed/jpct/World
    at HelloWorld.init(HelloWorld.java:18)
    at sun.applet.AppletPanel.run(AppletPanel.java:436)
    at net.sourceforge.jnlp.NetxPanel.run(NetxPanel.java:69)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: com.threed.jpct.World
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader$CodeBaseClassLoader.findClass(JNLPClassLoader.java:1348)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    ... 4 more
Exception in thread "TimerQueue" java.lang.IllegalMonitorStateException
    at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:155)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1262)
    at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:459)
    at java.util.concurrent.DelayQueue.take(DelayQueue.java:205)
    at javax.swing.TimerQueue.run(TimerQueue.java:167)
    at java.lang.Thread.run(Thread.java:679)

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-05-23T08:19:18+00:00Added an answer on May 23, 2026 at 8:19 am

    You have to put your dependencies on the same web server that is serving the Applet .jar file and give the locations either absolutely or relative to the root context of the Applet.

    And you have to load your Applet into your web browser from the web server, not from the file system.

    Here is the relevant reading materials.

    ARCHIVE = archiveList

    This OPTIONAL attribute describes one
    or more archives containing classes
    and other resources that will be
    “preloaded”. The classes are loaded
    using an instance of an
    AppletClassLoader with the given
    CODEBASE. The archives in archiveList
    are separated by “,”. NB: in JDK1.1,
    multiple APPLET tags with the same
    CODEBASE share the same instance of a
    ClassLoader. This is used by some
    client code to implement inter-applet
    communication. Future JDKs may provide
    other mechanisms for inter-applet
    communication. For security reasons,
    the applet’s class loader can read
    only from the same codebase from which
    the applet was started. This means
    that archives in archiveList must be
    in the same directory as, or in a
    subdirectory of, the codebase. Entries
    in archiveList of the form ../a/b.jar
    will not work unless explicitly
    allowed for in the security policy
    file (except in the case of an http
    codebase, where archives in
    archiveList must be from the same host
    as the codebase, but can have “..”‘s
    in their paths.
    )

    if your applet is at /var/www/html/Applet.jar then the simplest thing to do is put your dependencies in the exact same location /var/www/html/jcpt.jar and then you can just refer to it without having to worry about calculating the relative path.

    Example

        <applet code="HelloWorld"
              width=640
              height=480
              archive="HelloWorld.jar,jpct.jar">
        </applet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.