Applet in a package

Hi,
I have my main applet inside a package such as:
package temp;
import java.awt.Container;
...However, when I tried to call it from the browser as:
<applet code="HelloWorld.class" width=500 height=500>
<blockquote>
<hr>
You can't run applets,
so here's a picture of the window
this applet brings up:
</blockquote>
</applet>the applet.htm file is in the same folder as the Applet. However, this gives my a problem and i cannot see the applet :(
do you have some ideas?
Marcelo

try <applet code=test.HelloWorld.class ...

Similar Messages

  • Applet in other package then defaul

    I've searched for this first, cause it obvious that I am not the first one with this problem, but I didn't find the answer.
    What should the applet tag look like if i put the applet in non default package.
    folder tree:
    project_folder
    --package_folder
    ----MyApplet.class
    ----MyApplet.htmlIt works it IDE I'm using and from html file if I put it in th default package.

    Typically you would do one of the following.
    Using class files:
    foo
    |___com
    |    |___applet
    |         |___Applet.class
    |___applet.htmlwith the HTML: codebase="." code="com.applet.Applet"
    Note that you can move the location of "com" relative to "foo" by changing the codebase parameter
    Or using a jar file (better):
    foo
    |___Applet.jar
    |___applet.htmlwith the HTML: archive="Applet.jar" code="com.applet.Applet"
    Note that you can change the location of "Applet.jar" relative to "foo" by changing the "archive" parameter

  • Screen freezed as adding new applet to a package.

    I just download a trial version of JDeveloper.
    I always get a freezed screen as I try to add a new applet to a existing package.
    Is the trial version of JDeveloper a full functional package?
    Thanks.
    Chuck

    Chuck,
    You have the full production version.
    I have seen something similar, but it is a matter of finding the window beneath other windows.
    Let me understand what you are doing:
    1. You have a project ( File | New Empty Project)
    2. You select File | New... to launch the wizard gallery
    Point A : Maybe you don't see wizard3. You select the Applet icon and press OK
    Point B : Maybe you don't see wizardIs this what is happening - Are you at point A or point B or Other (explain).
    In some cases, the dialogs appear in back of other windows - you can try this trick:
    Right click on an empty part of the task bar and select menu 'Minimize All Windows' - This will force modal dialogs to the front.
    I hope this helps,
    John
    null

  • APPLET CODE WITH PACKAGE

    Hello,
    I have o code in a package and I do not know how to write the html file the code parameter is not enough I think. Do I have to add package=myapplication?
    Thanks in advance
    This is my html file
    <applet code="myapplication.class" >
    </applet>

    Let's assume that your Package is named package1 and your applet class file is named applet1.
    Now you must place your applet1 in a folder package1.
    Now, the html file looks like this
    <applet code="package1.applet1" width=300 height=200>
    </applet>
    You don't need to use codebase if you are in the root directory of the package.
    Get Your Java apps rated - http://www.thejavahub.com
    Find Great Java Applets, Applications & Servlets - http://www.thejavahub.com

  • Applet and Apache Package

    My applet works up until it needs to use classes found in the Apache HttpClient package - the java console displays an error stating that classes from the Apache package cannot be found. The entire java console error message is below. I don't understand why the Apache package cannot be found. When I run the code as an app from eclipse or from the java command line, the code works just fine - there is no problem finding the Apache package. Anyone know what I'm missing?
    Applet tag:
    <applet code="projects.web.UploadApplet" archive="../applets/webtools.jar" width="700" height="600"></applet>Java console error message:
    Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity
    at projects.web.AppletGUI$ButtonHandler.actionPerform ed(AppletGUI.java:169)
    at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.methods.RequestEntity
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    ... 25 more
    Caused by: java.io.IOException: open HTTP connection failed:http://xxx.xxx.xxx.xxx/site/php/org/apache/commons/httpclient/methods/RequestEntity.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 29 more

    paulcw wrote:
    Since the JVM is going to look on the web server (since that's where it found the HTML and the applet class to begin with), that's not going to work then, is it?No, it isn't going to work. The root of this problem was a fundamental misunderstanding I had about the compile process. I mistakenly thought that when any source code is complied the compiler checks the imported packages and classes to see if they are java library classes and if not then it adds them to the compiled code. So, when the error message indicated that the server was searching for the classes (in the jar file) I was confused as to why/where it was searching. After re-reading my notes I realize that I was completely off on the compile process.
    paulcw wrote:
    Yeah apparently you can set the classpath for applets, although I can't recall the syntax. (I believe the easiest way is to package your applet's class files into a jar, and use a Classpath attribute in the jar's manifest, but honestly I don't recall. Check the docs.)I looked into the docs and found out you can change the classpath by modifying the manifest file. According to the doc you create a txt file and use the "m" option during archiving to add it to the manifest file.
    I created a txt file that has the classpath information like so:
    Class-Path: ../apache/commons-httpclient/commons-httpclient-3.1.jar ../apache/commons-logging/commons-logging-1.1.1.jar ../apache/commons-codec/commons-codec-1.3.jar ../apache/junit-4.5.jarand added it to the manifest file via jar cfm jarFileName inputFiles
    Thanks paulcw.
    Edited by: Dan06 on Mar 31, 2009 1:44 PM Issues with modifying the manifest file were resolved by re-starting my computer.

  • Package and applet

    I am reading about Zhiqun's Java Card book,
    and I wonder about the relationship between a package and an applet.
    Am I right in saying:
    1. An applet comprises one or several packages
    2. A package only belongs to one applet
    3. One package is one group context
    Hope to get your guidance.
    B.R.
    RuHE

    Refers to your assertions,
    Please help me..
    Case 1
    I have package A. Package A contains 2 class (A1 & A2 ) and 2 package (B and C).
    Then, I make 2 applet, they are applet-B (for package B) and applet-C (for package C).
    When simulationi in JCWDE, applet-B and applet-C have no problem. But, in CREF, applet throw exception and status word is 6443.
    Case 2
    When I try to include class A1 and A2 into package B and C, so package A is empy. Surprisingly, applet-B and applet-C can run in CREF and JCWDE. I don't know, what's wrong in case 1.
    Can you give me explanation or explanation about problem in above...?
    Best Regards,
    Wiwit

  • Package with multiple applets

    Hi
    I want to install 2 applets on real java card. They both are in the same package and cna use each other.
    How can i do this on JCOP ?
    and what if they are on difference packages and what if i am using some other lib as well ? do i need to install that lib too if yes then how ?
    BR
    Umer

    If your packages and applets are in one JCOP Java Card project, this should be handled for you. You can have multiple applets in a package, you can have multiple instances of a single applet, and you can have multiple packages with multiple applets as well as library packages.
    If you want to access an applet from another applet in the same package, it is like referencing any other class instance. If they are in different packages you need to use shareable objects. This is because of the applet firewall.
    Cheers
    Shane

  • Possible to check in Java, if if a package is already in the jar-Cache?

    I have an applet, that has only one main.jar in the Cache-Archive parameter.
    Because I wanted to reduce the preload-Time, since 1.4.0 I use an index.list file, listing
    the rest of jar-Files needed for my applet. So the jar-Files will be only
    downloaded to the time, they are needed, if they aren't already in the jar-cache.
    The Problem: If the applet needs a new jar-File, that isn't in the jar-Cache, it needs
    time to download the package. But the user doesn't see that something happens.
    Is it possible to check with JAVA in the applet, if a package is already in the jar-Cache?
    If i know this, I'll be able to show the user that the applet is currently downloading a package.

    do u mean a file in the JAR?
    if yes, yes u can check that.
    check this,
        public ImageIcon loadImage(String location)
    java.net.URL url =  null;
    url = getClass().getResource(location);
    if (url == null) then ...
        } 

  • ClassNotFound error while running applet from Web application

    hi everyone,
    I have a web application deployed in Tomcat web server. I have HTML file at the level of WEB-INF. And all class files under WEB-INF/classes. But while ruuning the application it giving following error.
    load: class com.app.AppletTest not found.
    java.lang.ClassNotFoundException: com.app.AppletTest
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Here the HTML file applettest.html
    <html>
         <head>
              <title>Multiple Image Upload</title>
         </head>
         <body>
              <applet code="com.app.AppletTest" width="300" height="300">
              </applet>
         </body>
    </html>
    And Java applet file is
    package com.app;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Graphics;
    public class AppletTest extends Applet
         public void init()
              System.out.println("Init called");
              this.setBackground(new Color(180,200,250));
         public void start()
              System.out.println("Start called");
         public void paint(Graphics g)
              g.drawString("welcome Hello World",50,50);
              System.out.println("Paint called");
         public void stop()
              System.out.println("Stop called");
         public void destroy()
              System.out.println("Destroy called");
    Thanks.

    Hi,
    if u put ur com.app.AppletTest file @ WEB-INF Directry, then this problem will solve easily.
    you have to put applet package(com.app.AppletTest) @ WEB-INF Directry. Since
    Applet is using by html, u have to keep applet with html file.
    if applet class have interaction with other classes, u have to seperate all related class to applet to seperate package and put them @ WEB-INF folder.

  • ClassFormatError when attempting to load an applet from within a JSP

    Greetings everyone.
    I have a problem that i seem unable to solve.
    I've created a web application. I'm using Java 1.4.2_05 and Tomcat. Right now i'm trying to load an applet from a JSP and i'm getting an error that, try as i might, i can't understand why it happens.
    Here is some detailed info:
    The applet's code:
    package smpb.myapp.controllers;
    import java.applet.Applet;
    import java.awt.Graphics;
    public class GUIApplet extends Applet
         public void init()
         public void stop()
         public void paint(Graphics g)
                  g.drawString("Hey hey hey",20,20);
               g.drawString("Hellooo World",20,40);
    The JSP's code:
    <%@ page language="java"
                   import="java.util.*"
                   session="true" %>
    <%
         String name = (String) request.getSession().getAttribute("userName");
    %>
    <html>
         <head>
              <title>Login</title>
         </head>
         <body>
              <h1><p align="center">Application</p></h1>
              <br>
              Welcome <%= name %>! Thank you for logging in!
              <br><br><br>
              <applet align="middle" code="smpb.myapp.controllers.GUIApplet.class" codebase="./" archive="MyApp_applets.jar">
                   Your browser does not support this feature.
              </applet>
              <br><br>
              <a href='<%=request.getContextPath() + "/LogOut"%>'>Log Out</a><br>
         </body>
    </html>-------------------------------------------
    When i reach this JSP the applet fails to load and i get the following error message at the java console:
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:157)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1856)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    Exception: java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)-------------------------------------------
    The JSP is in the root directory of the web application's path right along with the jar file. The jar file itself has the following structure:
    Archive:  HelpDesk_applets.jar
      Length     Date   Time    Name
            0  05-17-06 12:17   META-INF/
          106  05-17-06 12:17   META-INF/MANIFEST.MF
            0  05-10-06 17:14   smpb/
            0  05-10-06 17:14   smpb/myapp/
            0  05-12-06 16:50   smpb/myapp/controllers/
          794  05-12-06 17:15   smpb/myapp/controllers/GUIApplet.class
          900                   6 filesNow, i've tried loading the very same jar file that i use in the JSP through a static HTML which is virtually identical to the JSP i presented and everything works just fine. I've checked and rechecked to see if all the permissions to access the jar file were accurate, i checked to see if Tomcat had it's MIME settings correctly configured so that there was no chance that the files were being corrupted during the load (as that is a usual cause for the problem, or so i've gathered) but to no avail. I've searched the web, including these forums, and found similar problems but no conclusive solution. I can't seem to figure out, at all, what could possibly be wrong. Does anyone have any ideas? I've tried to be as thorough as i could from the start, so, any help would be deeply appreciated.

    Hi mshah101,
    This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher)

  • NIGHTMARE! Signed Applet - No Access. Please Help.

    Hi:
    I'm trying to make a signed applet gain access to my directory structure.
    I created a simple applet to test with one line:
    sErr = System.getProperty("user.dir");
    The code is below.
    I sign it using the following:
    keytool -genkey -keyalg rsa -storepass MyCerts
    As you can see I'm using the default keystore but I've tried it by using -keystore MyKeystore too.
    It runs me through all the questions which I answer, no problems.
    Then I sign it:
    jarsigner -signedjar SSignedApplet.jar SignedApplet.jar MyCerts
    It asks for the passwords which I enter.
    It completes without error and the SSignedApplet.jar file shows up in the directory.
    If I open the signed jar file it has all 3 of the files in the META-INF folder and the Manifest file looks right to me.
    I upload the jar and the Default.asp file to a Web server (I've tried localhost and a remote host).
    I open the page and the pop up comes up asking if I want to trust the unverified applet. I click 'Run'.
    Once the applet is 'Started' I click the 'Get Properties' button and I get the error:
    access denied (java.util.PropertyPermission user.dir read)
    I've tried 2 examples that work fine on my machine (that I didn't write).
    The first is by Francois Orsini (Derby Demo) and the other is by Laura MacDougal (successfully wrote a file to my user.dir directory).
    No matter what I do, I can't sign an applet and make it access anything.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en-US">
    <head>
    <script language="JavaScript" type="text/javascript">
    <!--
    function getProp()
         oApplet = document.SampleApplet;
         oApplet.getProp();
         alert(oApplet.sErr);
    // End SCRIPT -->
    </script>
    </head>
    <body bgcolor="#ffffff" style="margin:0px auto;width:800px;padding:0px">
    <form name="fmLogin" action="" method="POST">
    <table width="650" align="center" cellpadding="0" cellspacing="0">
         <tr>
              <td>Login</td>
              <td><input name="Login"></td>
         </tr>
         <tr>
              <td>Password</td>
              <td><input name="Password"></td>
         </tr>
         <tr>          
              <td colspan="2"><input type="button" onclick="getProp();" value="Get Property"></td>
         </tr>
    </table>
    </form>
    <APPLET CODE="SignedApplet.SampleApplet.class" WIDTH=1 HEIGHT=1 NAME="SampleApplet" ARCHIVE="SSignedApplet.jar"></APPLET>
    </body>
    </html>
    package SignedApplet;
    import java.applet.*;
    import java.io.*;
    import java.util.*;
    public class SampleApplet extends java.applet.Applet {
        public String sErr = "";
        public void init() {
            // TODO start asynchronous download of heavy resources
        public void getProp()
            try
                sErr = System.getProperty("user.dir");
            catch(Exception exp)
                sErr = exp.getMessage();
        // TODO overwrite start(), stop() and destroy() methods
    }

    Thank you for reading my reply in your other thread:
    http://forum.java.sun.com/thread.jspa?threadID=762212&messageID=4368224#4368224
    If you've really run through it you would have known that code called from
    javascript is not trusted and you have to use doprivileged (hey its in bold...
    why would that be?).
    Call getProp from init within the applet and you've got no problem.
    As for your imageIcon, creating one with string as a parameter
    the string is used as input for a File. I had no problem loading one with a signed applet.
    I'll post the example later in your other thread.

  • NEW to J2EE----Class(within WEB-INF) can't access applet

    I admit I'm a newbie. Situation: an applet can import packages or individual classes that are located in WEB-INF dir. Is the reverse true, that the same classes can touch the applet? If so, how do you implement this, tried to import applet class, no luck though. I figure the reverse isn't true. Just wanted some ideas for a work around and or confirmation of my question. Thanks

    ok, security isn't an issue or concern since this is an intranet app. What I am trying to do is load and reload data to a JTable in an applet. The code that retrieves this data is located in WEB-INF. Is there a work around to make this work.

  • Applet in a pack

    my java Applet class has package
    package com.web;
    import java.applet.Applet;
    import java.awt.*;
    public class Display extends Applet
    ..........i want to use this class in JSP
    <applet code="Display.class" width="300" height="150">
    </applet>
    How do i write it ?

    Applets run on the CLIENT jsp runs on the SERVER.
    What you put in the @page (import) is used on the SERVER and the applet has
    nothing to do with it.
    put your applet in the correct directory (or make a jar).
    In this case the applet is in:
    [codebase]\com\web\Display.class
    Your applet tag should look like:
    <applet codebase="../WhateverTheCodeBaseToYourAppletIs" code="com.web.Display">
    Then convert the applet tag to object tag using the htmlconverter in the jdk dir.
    Then make sure you have a correct working object tag for IE users:
    http://forum.java.sun.com/thread.jspa?threadID=640305&tstart=135
    1st and 7th post

  • Applet not displaying images

    i have created a class which extends an abstract class that extends applet, and this class fails to show images when i use the graphics.drawImage command in paint.
    note: i am using appletviewer
    package hangman;
    public abstract class Hangman extends Applet
           implements KeyListener
    package christmas;
    public class Christmas extends hangman.Hangman
       private Image[]   noosePosition;   
       private Image     escape;
       private int            index;
       public void init()
          noosePosition = new Image[11];
          for (int i = 0; i < noosePosition.length; i++)
           noosePosition[i] = getImage(getCodeBase(), "images/noose" + i + ".bmp");
          escape    = getImage(getCodeBase(), "images/escape.bmp");
          index     = 0;
        public void paint(Graphics g)
           int x = 40;
          switch (index)
              case -1: g.drawImage(escape, 150, x, 50, 100, this); break;
              default: g.drawImage(noosePosition[index], 150, x, 50, 100, this);
                            break;
    }upon winning the index is changed to -1 and each wrong guess increments the index by 1. I know that the paint command is called because other code in the paint method is executed. everything else works in the program and it produces no errors.
    the directories are as such:
    my stuff (base directory)
      hangman (folder)
         Hangman.class
         [two inner classes of hangman]
      jdk profiles (folder)
      christmas (folder)
          Christmas.class
      Hangman.java
      Christmas.java
      images (folder)
          [all bitmap images referred to in code]
      Christmas.htmlthe html file is as such:
    <HTML>
    <HEAD>
    <TITLE>A Christmas Program</TITLE>
    </HEAD>
    <BODY>
    You may need to give authorization to run java applet.
    <APPLET CODE="christmas\Christmas.class" WIDTH=500 HEIGHT=500>
    </APPLET>
    </BODY>
    </HTML>

    to
    <APPLET CODE="christmas.Christmas" WIDTH=500
    HEIGHT=500>
    I think it won't work because of parameter CODE. The browser or Appletviewer can just think that it's a file "christmas" with a Christmas-extension.
    Any case, my applets work in a such way:
    <APPLET CODEBASE="christmas" CODE="Christmas" WIDTH=500 HEIGHT=500>
    Message was edited by:
    stopper

  • How to use an Applet with multiple-jars

    Hi everybody,
    I would like to use an applet with multiple-jars.
    ex:
    <applet codebase="." archive="main.jar,Addon1.jar,Addon2.jar" code="Appl.class" id="MyTest" width="600" height="30">
         <param name = "MyParam" value = "1;2">
    </applet>
    An applet with :
    -> 1 Main JAR
    -> X Addon JARs (X : a parameter "PRM")
    My main part knows the parameter "PRM" -> knows which addon to use
    My question is, how do I use classes from addons, inside the main part (and vise-versa if possible) ?
    Thanks in advance
    Best regards

    I try what you say :
    === HTML ===
    <applet codebase="." archive="Main.jar,Addon1.jar" code="Test.Appli.class" id="MyTest"  width="600" height="30">
         <param name = "myPrm1" value = "1;2">
    </applet>=== MAIN JAR ===
    package retest;
    interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    public class Ctest {
        public Ctest() {}
        public void unTest(String sClassNameR) {
          String sClassName = "PackTestAddon.TestClass1";
          try {
              Object oObj = Class.forName(sClassName).newInstance();
              ((InterfAddOn1) oObj).AfficheTest1(" Hello World ");
          } catch (ClassNotFoundException ex1) {
              System.out.println("ERR Class not found");
          } catch (IllegalAccessException ex1) {
              System.out.println("ERR Illegal Access");
          } catch (InstantiationException ex1) {
              System.out.println("ERR Instantiation Exception");
    }=== ADDON JAR ===
    package PackTestAddon;
    public interface InterfAddOn1 {
        public void AfficheTest1(String sStrTest);
    package PackTestAddon;
    public class TestClass1 implements InterfAddOn1 {
        public TestClass1() {}
        public void AfficheTest1(String sStrTest) {
          System.out.println("Test :"+sStrTest);
    }I have this error :
    Exception in thread "AWT-EventQueue-2" java.lang.ClassCastException: PackTestAddon.TestClass1
         at retest.Ctest.unTest(Ctest.java:58)
         at retest.Appli.actionPerformed(Appli.java:442)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I don't really know why ... =;o(
    Helppppp ... Thanks in advance.

Maybe you are looking for