Loading multiple-package applet from JAR

Hi, apologies in advance if this has been dealt with in this forum already. I've got two questions:
Question one: I have written two packages, evolve and fences. I would like to run fences.Fences.class which is an applet. I went to my classpath directory and typed
jar cf mystuff.jar evolve fences
(each package lives in its own directory off the classpath.)
then made a web page that said
<html><body>
<applet code=fences.Fences.class archive=mystuff.jar>
</applet>
</body></html>
I then piped the HTML file and mystuff.jar up to a remote server to make sure I wasn't reading my local fences package, made them world readable, and tried to load the web page. On my local machine, a Linux box running Galeon 1.2.5 (Mozilla, basically), I could load the applet. On a separate box running IE 5 I got the error in the status bar "load: class fences.Fences not found" . I'm not sure how to open the Java console in IE so I can't give any more info than that.
I suspect that perhaps my local box is still somehow using my local classes or an old copy of the applet and is not loading from the archive, but I can't be sure.
Question two: Until stumbling upon the answer in this forum, I wasn't sure how to run an applet that used more than one user-created package. I see that I can package both into one archive; but I thought that I could also have separate .jar files for each package and then specify both in the "archive=" <applet> parameter. It didn't seem to work. Anybody know if there's a way to do this?
Thanks in advance for any help!

yes, i've seen that since i originally posted, tried it - didn't work. I've since tried another even simpler test, to try to isolate the problem. I wrote this code in a file called Tester.java:
import javax.swing.*;
class Tester extends JApplet {
  public void init() {
    getContentPane().add(new JButton("Hi"));
}I compiled this class and put it at http://www.cs.uga.edu/~gundlach/jartry/Tester.class . I then created a webpage in the jartry/ directly that says:
<html><body>
<applet code=Tester.class width=55 height=68></applet>
</body></html>
Then, using Mozilla to go to http://www.cs.uga.edu/~gundlach/jartry/test.html , I get the applet with the single button. When I open it in IE 5, it says "load class Tester not found" when I mouseover the applet.
What the heck am I doing wrong?
Thanks
Michael

Similar Messages

  • Problem loading Applets from Jar files on 64 bit machine

    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases. The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Below are all of my test results. Can someone provide a suggestion for repairing this? The Windows Server machine is a clients computer I access to it via remote desktop but I can't do much with it though I do have administrator rights. The Windows 7 machine is my development platform so I have been able to do extensive testing on it.
    This problem is presenting in the following environments when trying to load an applet from JAR files in a HTML document using the Applet or Object tag.
    Windows Server 2008 (Intel Chipset)
    Tested Browsers:
    Internet Explorer 9 (32 bit) - Shows it is blocked by default then simply shows an x when loaded from a web page, same result when loading from local drive.
    Windows 7 Home Premium (AMD Chipset)
    Tested Browsers:
    Firefox 6.0.1 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    Internet Explorer 9 (64 bit) - Java logo shows with spinner and most of the windows desktop manager freezes, keyboard is the only thing that responds so you can alt-tab to another app to regain control of the desktop.
    Chrome (32 bit) - Java logo shows with spinner, after a few minutes there is finally an error that a class in the jar was not found
    The only way I have been able to get a Java applet to run on a 64 bit machine are the following ways.
    Firefox 9 nightly (64 bit) works perfectly! Go Firefox!
    Internet Explorer 9 (32 bit) loading directly from drive (c:\...)
    Chrome (32 bit) loading directly from drive (c:\...)
    Firefox 6.0.1 (32 bit) loading directly from drive (c:\....)
    Can someone please help! I've been fighting with this bug for over a week and I can't find anything that will solve it, I have noticed that in some cases if my jar has very little code in it than it will run on the server, but the minute I start adding things to it the jar won't load anymore.

    jschell wrote:
    rritoch wrote:
    I am developing an applet (extends Applet but uses swing components) using JDK 1.6 (Though these problems still happen in JDK 1.7) and I am unable to get the applet to load on a 64 bit machine in most cases.
    To clarify...
    1. You have tried it on 32 bit machine? Exactly which OS?I tested this on Windows Vista Business which is in 32 bit mode and the applets run without any problems
    >
    2. Your only 64 bit tests have involved 2008/Win7?
    If so then I would suspect something with windows not java. Probably permissions.
    The web server(s) are running on localhost and I am connecting on the same machine using a local network ip address (such as 192.168.*.*)
    Yes, I haven't tried running the jars on other operating systems.
    >
    I don't understand that. If you are running on localhost then you should connect to localhost. If running on an IP then you should connect to that. Perhaps you meant that you have tested using both of those?I'm testing using the lan ip address but I'm connecting from the same machine. I've tried localhost and that didn't work so I tried lan ip since that will likely have a different java security context than localhost. At first I was blaming the IIS server but I downloaded the jar directly and using HTTP fox was able to verify that the jar is being sent with the correct mime-type and that the server can upload the jar file without a problem. This leaves me to believe the problem is with Java.

  • Loading File (not-image) from JAR ..

    Here s the jar structure i have:
    myapp.jar:
    -- package1:
    -- -- *.class
    -- file.ext
    -- image.gif
    How come i cant create inst. of File with the new File(with getClass().getResource("/file.ext").getFile()); ??
    There s no problem with loading the image, but the other file always fails .. it says that the path is wrong (i guess it s beacause file:\D:myapp.jar!\file.ext is not a 'real' file-system path). How can i load a file from jar, without using getResourdeStream, without any temp files .. I would really appreciate some help. Thanks in advance.
    Edited by: kokoroko on Dec 23, 2007 12:16 PM

    i need an inst. of the File class pointing to tht file.The only file mentioned in your OP is D:myapp.jar and you can get the corresponding File object by parsing the string returned by getFile(). Notice it will still only be a valid file if getResource() returns a file: URL - something that cannot be guaranteed.
    The point bears repeating, perhaps: D:myapp.jar!\file.ext is not a file. It is a resource (accessible via an input stream). Because it is not a file there is not - and never will be - any File object which represents its name.
    I was ( and I m still) thinking tht it could be some classpath-and-sh**t problem.The classpath has a bearing on where a resource will be looked for, but says nothing at all about what is looked for. In this case you simply cannot "load" the file (whatever "load" means) because there is no file to load.
    Finally, it is quite possible that you can do whatever it is that you are trying to do. But you have yet to say what that is: not how you want to do it (by instantiating a File, not by creating a temporary file or using an input stream), but what you want to do.

  • Load Multiple Tables (schemas) from same XML file

    Hi,
    This is first time i am working XML files.
    I have one XML file with two tables (schema). I need to load those two tables into two different Target tables.
    This is the startegy to choose tables.
    <Entry type="full"> --Table 1
    <Entry type="short">--Table 2
    I am try to find the tables like this using condition split (Type == "Full" ) but tables are not splitting as expected, is am i going with wrong approach??
    Can anyone suggest me to process multiples tables from same XML file??

    Hi Naveen,
    After the issue in my environment, the package works well that the data in the XML file load to two destination tables based on one column values. The screenshot is for your reference:
    To troubleshoot this issue, could you please check the values in the type column? Verify the values have exactly the same characters, case sensitivity. It seems that you haven’t write correct values in the Conditional Split Transformation. They should be like
    below:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
     If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Duke$ - Multiple packages in one jar... again

    My jar contains 2 packages.
    One is my own, the other one is the JNIRegistry from Ice. (Excellent for Windows. Download it at: http://www.trustice.com/java/jnireg/index.shtml )
    My application starts from the jar file and works just fine, but as soon as one of my classes tries to import/load a class from the com-package, the NoClassDefFoundError exception is thrown.
    I created the jarfile in my app-folder by using:
    jar cfm myJarFile.jar manifest.mf myPackage com
    This is the folder tree:
    C:\
    |
    |-app
    |
    |--com (folder)
    |
    |--myPackage (folder)
    |
    |--manifest.mf
    I have checked the contents of the jarfile, nothing is missing.
    This is the manifest file:
    Main-Class: myPackage.App
    I am sure there must be a way around this... The closest solution I have found was at:
    http://forum.java.sun.com/thread.jsp?forum=22&thread=30891
    It says specify each class you want to import from the other package, for example dont use
    import com.ice.jni.registry.*;
    but
    import com.ice.jni.registry.Registry;
    import com.ice.jni.registry.RegistryKey;
    import com.ice.jni.registry.RegStringValue;
    So I did. Nothing changed, still the NoClassDefFoundError
    Any help?
    Thanks in advance

    Hey guys,
    This is how you do it. I have an example here for you to follow:
    -----Test.java
    package com.test;
    import another.one.*; // note * is ok to use!
    class Test
         public static void main(String[] args)
              System.out.println("Hello from Test!");
              Target.main(null);
    }------Target.java
    package another.one;
    public class Target
         public static void main(String[] args)
              System.out.println("Hello from Target!");
    }place files like so:
    {path}/com/test/Test.java
    {path}/another/one/Target.java
    compile classes, then create a manifest:
    ---manifest.txt
    Main-Class: com.test.Test
    {a blank line here}
    place at:
    {path}manifest.txt
    now create jar;
    {path}> jar cmf manifest.txt myJar.jar com/ another/
    and enjoy ;-) java -jar myJar.jar
    -Ron

  • Target to execute multiple junit tests from jar file

    I have written a custom selenium framework using JUnit and Selenium, problem I am having right now is our team wants to run the tests inside HP Quality Center (I have no idea or any experience with Quality Center) but if I provide a jar file the them they can execute it inside the Quality Center (Reason to run it in Quality Center is for reporting purpose).
    Problem is that I have created my framework in away that You can create multiple JUnit base test files for different tests also keep in mind that these classes dont need main method (This is where the problem when it comes to jaring up ). I have introduced following ant target to run all the test cases.
         <target name="test.selenium" depends="jar" description="target to execute all the selenium tests.">
              <junit printsummary="yes">
                   <classpath>
                        <path refid="classpath"/>
                        <path refid="application"/>
                   </classpath>
                   <batchtest fork="yes">
                        <fileset dir="${src.dir}" includes="**/Test*Selenium.java"/>
                   </batchtest>
              </junit>
         </target>above ant target runs without any problem, but when you jar it up you need a manifest and main class, is there away I cant introduce some attribute that can execute all my tests without adding main method to each of them.
    Here is my ant target for jar
         <target name="jar" depends="compile"
                   description="Generates final jar">
              <copy todir="${build.jar}">
                   <fileset dir="lib" excludes="**/*.java"/>
              </copy>
              <jar jarfile="${build.jar}/yukonSelenium.jar"
                        basedir="${build.classes}">
                   <manifest>
                        <attribute name="Main-Class" value="com.somepackage.selenium.test.TestAuthenticationSelenium"/>
                        <attribute name="Class-Path"
                             value=". /c:/build/jar/log4j-1.2.15.jar /c:/build/jar/junit-4.6.jar /c:/build/jar/selenium-java-client-driver.jar /c:/build/jar/dom4j-1.6.1.jar"/>
                   </manifest>
              </jar>
         </target>And this is how the Test Class looks like, I have added main method in this but once i do this after jaring java -jar myJarfile.jar will only execute just the class i have main method init.
    public class TestAuthenticationSelenium extends SomePrivateFrameWorkClass {
         private void init() {
              start();
         @Test
         public void testProductNav() {
                //somecode
         @Test
         public void multipleLogin() throws FileNotFoundException, InterruptedException {
                             //Some Code
         public static void main(String[] args) {
              org.junit.runner.JUnitCore.main("com.somepackage.selenium.test.TestAuthenticationSelenium");
    }Please let me know if i should put the entire ant build file.
    Thanks for any help.
    anuradha.uduwage
    Edited by: Tilter on Aug 24, 2009 10:05 PM
    Edited by: Tilter on Aug 24, 2009 10:06 PM

    What i mean is if i have 3 class files in my jar file, and each one of those classes has a main method, how will i be able to execute a class of my choice from that jar file. In manifest files, you specify the main class, but how would i specify multiple classes with main methods, or achieve my objective here.

  • Loading screen above Applet from an iframe

    Hi,
    i am running this code for loading screen which is transparent
    http://www.andrewpeace.com/loading-screen.html
    now i am placing an iframe
    <p><iframe src="http://statlab0.fon.bg.ac.yu/eng/eng/apletieng/buffon/Coin.html" id="appletFrame"></iframe></p>
    so that i may also come behind the loading screen. But the applet is coming in front of the loading screen and not goin behind the screen. can anyone suggest a way to let the applet also to be behind the loading screen.
    the above html had the javascript code for loading screen.
    if anyone can help out today :(
    i am in urgent need.

    No, but maybe a trace could shed some light on the problem:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0_03.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    Print out the full trace of the exception:
    try{...}catch(Exception e){e.printStackTrace();}

  • Loading multiple text files from a folder into oracle clob field

    I would like to load about 300 word documents into a oracle clob field with each document inserted as a separate record.
    I'm not quite sure how to go about doing this. Is there a utility in oracle that would do this?
    I've looked at sql loader and utl_file but both require the name of the file. Is there a way I can do this?
    If its not possible using just oracle, does anyone know how I can do this in combination with perl?
    Many Thanks
    Sam

    I have no experience with this, but pl see if MOS Doc 73787.1 (How to Read A Binary File into BLOB Using PL/SQL) can help.
    Essentially, you will have to write code to loop thru all 300 files to load them into the database
    HTH
    Srini

  • Is it possible to load multiple exs24 patches from MULTIPLE locations on my hard drive ?

    I have a couple of external/internal HD's all with many patches and samples organised how i see fit in genres.
    Can I get exs to scan all of these drives for relevant patches - as appose to taking each one and putting it into the sampler instruments folder ?
    Surley there is a solouton to this ?
    Many Thanks in advance ..

    Hi
    Yep..
    The short story is that you can put your sample and sampler instruments wherever you like, but the Instruments ( or maybe better, an alias to the Instruments folders in these locations), should be placed either in
    Library:Application Support:Logic 
    or
    <User>:Library:Application Support:Logic
    The Folder in the above locations must be named "Sampler Instruments" with no 'alias'.
    It can be *very helpful* to use Redmatica's EXS manager or ProManager software to re-link samples to Sampler Instruments.
    CCT

  • Problem loading applet from tomcat

    I am facing a problem loading the batik applet from tomcat. I have placed all the jar files of batik in ROOT directory in tomcat. Along with the folder containing the batik applet. Still i receive the following exception when trying to load the html page containing batik applet.
    Applet tag in html page is:
    <applet codebase = "." code="batik_applet.BatikApplet.class" name="myApplet" width="1600" height="1200" hspace="0" vspace="0" align="middle" archive="batik-swing.jar,batik-gvt.jar,batik-bridge.jar,xml-apis-ext.jar,batik-css.jar,batik-util.jar,batik-dom.jar,batik-svg-dom.jar,batik-anim.jar,batik-awt-util.jar,batik-codec.jar,batik-ext.jar,batik-extension.jar,batik-gui-util.jar,batik-parser.jar,batik-script.jar,batik-svggen.jar,batik-transcoder.jar,batik-xml.jar,js.jar,pdf-transcoder.jar,xalan-2.6.0.jar,xerces_2_5_0.jar,xml-apis.jar">
    </applet>
    I already have a folder named batik_applet containing BatikApplet.class in the ROOT directory.
    ========Exception===========
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with proxy=DIRECT
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with proxy=DIRECT
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
    load: class batik_applet.BatikApplet.class not found.
    java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
         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
    basic: Exception: java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
    Any help would be appreciated.

    Assuming that your applet is not in a jar file (don't see a value for archive)
    you have a file callsed ProcessStatus.class in a folder WEB-INF\classes relative to
    the location of the jsp file.
    So if the jsp file is in
    myJSPFileFolder
    the class should be in:
    myJSPFileFolder\WEB-INF\classes
    If you want to see when the jre is trying to load and where it it trying to load it from you
    can inspect a full trace, to turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    The trace should show something like :
    Caused by: java.io.FileNotFoundException: http://server/location/filename.class (The system cannot find the path specified)

  • Cannot load component from JAR file.

    I got the message : cannot load component ... from JAR file. The class must be compiled and must be on the classpath of the project...
    I just add a javabean from a JAR file from Palette manager, then drag and drop it, then got this message.
    Can anyone tell me what i was wrong ? Thank you.

    Hi,
    You should paste your error log here to easy for other to help you.
    For your scenario, it is a big chance you didn't include the jar file into your classpath, please check.
    Thanks.

  • Applet not loading from JAR?

    Well, I've been having a bit of a problem with embedding my applet into a webpage. My applet tag looks like this:
    <applet archive="poke.jar" code="a.class" width=550 height=600>
    <param name=cachelistsrcdir value="http://io9labs.com/poke/cache">
    </applet>and when I access the page, I set the trace level to 5 in the Java Console, and look into it and see the following:
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@61db2b
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@1df377e, refcount=0
    basic: Caching classloader: sun.plugin.ClassLoaderInfo@1df377e
    basic: Current classloader cache size: 3
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    basic: Quiting applet ...
    basic: Joined applet thread ...
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1df377e, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@c710ba
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: completed perf rollup
    network: Cache entry not found [url: http://io9labs.com/poke/a.class, version: null]
    network: Connecting http://io9labs.com/poke/a.class with proxy=DIRECT
    network: Connecting http://io9labs.com/poke/a.class with cookie "PHPSESSID=831a2067577cfe38db085b2566c36631"
    network: Cache entry not found [url: http://io9labs.com/poke/a/class.class, version: null]
    network: Connecting http://io9labs.com/poke/a/class.class with proxy=DIRECT
    network: Connecting http://io9labs.com/poke/a/class.class with cookie "PHPSESSID=831a2067577cfe38db085b2566c36631"
    load: class a.class not found.
    java.lang.ClassNotFoundException: a.class
         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
    basic: Exception: java.lang.ClassNotFoundException: a.classIt seems as though it's trying to load the applet from the actual directory, instead of the JAR. Any ideas on why this is happening? Thanks in advance for your help.
    Also, the applet is located at http://io9labs.com/poke/

    I'm using Mozilla Firefox 3.0.1 on Windows XP with SP2. I tried running it with IE7 and it gives me the same exact problem. It can't be my browser because it loads JAR'ed applets on any other webpage just fine.
    I tried it with a non-obfuscated JAR, and it STILL gives me the same error. Do you have any ideas as to why it would choose to ignore the archive attribute?
    EDIT: I think it might be because I signed it improperly, lemme try that.
    EDIT2: Nope, still doesnt work
    EDIT3: Problem solved, it was because the JAR needed a unique name, and i already had a jar of the same name in my cache.
    Edited by: io9_ on Aug 20, 2008 11:17 AM

  • Problem in loading applet from non executable jar file

    hello ,
    I am new to jar concept plz help.. I am trying to call an applet from another applet through frame it is working fine but its download time is much more. now i want to store all my images , sound files and class files of other applets in a jar file and want to access these inner applets from this jar file so that it will make only one http connection with the server for this jar file only and can reduce the download time of applet.
    Can anyone can give me suggestion plz..
    Thanx

    You have to download what you have to download. You
    probably can't easily share images between 2 separate
    Jar files. Unless you can expose them through the
    other applet via a method that can be known once you
    have the reference to the other applet.Thanx but i think i have to elaborate the problem :
    my project structure is just like this ::
    on the top is ::
    Applet A---> from this applet i am callling Applet B & Applet C in frame
    and communication is established between these 3 applets successfully .
    now i have made a single non executable jar file which contains images , sound and class files of these applets .
    so i am referencing images and sound files in applets through this jar.
    but i wanted to load Applet B & C through this jar file only.
    How can i do this ??
    Thanx .. I hope now the problem is clear

  • Multi-file Loading Single Package from Multiple Agents?

    hi,
    i am trying to load the Multiple files from(Interface-Load Multiple file to Oracle DB) a package. as this activity is done multiple loading files Name from single table.
    I just want to know that is there any solution to execute the single Package from Multiple Agents for Load Balancing from Single table. & if YES then refer any document????
    Regards,
    AMSII

    done.resovlesd my self

  • 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)

Maybe you are looking for

  • Delete from Open Dialog Box?

    I'm a new convert from Windows to Mac. My question is: Is there a way to delete a file from a list of files in an Open or Save As dialog box? (On Windows I could just highlight the filename and press the Delete key.) Thanks. MacBook   Mac OS X (10.4.

  • Itunes will open on vista, but then is completely locked.

    My daughter's vista laptop will open itunes, but then it is completely frozen. mouse clicking, keyboarding, and scrolling do not work. It also does not recognize her iPod. I have to close it with the task manager. It has worked previously and she has

  • AFP/AppleTalk listener closed because of AppleTalk error Then AFP Stops

    Have just installed Server 10.4.8 & have run all software updates. Configured and started DHCP & DNS. Tested both successfully. Made server open directory master. Created network accounts. Accessed these accounts successfully from powerbook. Started

  • File Sharing Settings

    I cant seem to find File Sharing settings. which MP3 ringtones require me to sync my iphone to itunes and go to File sharing Settings

  • PSE10 stops responding, shutdowns and restarts

    When my PSE10 stops responding, as it frequently does, it does not pay to wait.  Even if it finally responds, I have to shut down my computer before I can access the app and begin work again.  Has anyone else had this experience and if so what did yo