ClassNotFoundException: Jar - Applet - WebServer ?

I'm running an applet (IE 5.0 whith plug-in) from a web server (MIIS). The applet uses some other classes. If I put the html page, the applet and the other classes in the same directory, everything works fine.
If, instead of it, I put in that directory the html page, the applet (*.class) and a jar file containing the classes the applet need, I get the ClassNotFoundException. What is wrong with this?
Can anybody help? I have read a lot of messages from this forum, looking for a similar problem, but nobody seems to have it.
Thank you in advance.
[email protected]

Placing your class files in a jar is nice for speeding up the download process, but you don't necessarily have to have them in the same jar. You have a couple of options at your disposal.
1. Use the html archive tag to specify multiple jars. There is nothing wrong with the specifing multiple jars in the archive value - just seperate them with commas.
ex. archive="one.jar, two.jar, images/three.jar"
2. Use the download extension mechanism. Place your classes in a jar, and create a custom manifest for that jar specifing a Class-Path attribute that refers to another (or multiple) jar file(s).
ex. Class-Path: one.jar, two.jar, images/three.jar
When specifing the additional files, in most cases use relative paths. When this is not possible, an absolute URL may also be used (but with some care - it's not obvious in some cases).
Be warned though, that trying to traverse up a directory tree (by using "..") can lead to a security exception in some browsers, so try to plan ahead and not do this.
Hope this helps,
-Ron

Similar Messages

  • ClassNotFoundException in applet-urgent

    Hai
    I am having an applet "tstapplet" whose class file is stored in a jar file and the applet is inside a package named test.
    I wrote the following applet tag
    <applet code="tstapplet.class" archive="../deploy/showj.jar">
    </applet>
    I am getting ClassNotFoundException ; tstapplet.class
    What should I do Is the applet code wrong
    Plz help urgent
    tintuthilak

    <applet code="test.tstapplet" archive="../deploy/showj.jar">
    </applet>
    Try to open it with Firefox or Mozilla (you can be sure MSJVM does not try to open
    the applet).
    When it works convert the html page with [jdk.home]\bin\htmlconverter.exe

  • Problems during execution of signed JARs applet...

    Hi Everyone,
    I noticed that AppletViewer used for development allows a wider range of operation not permitted during the execution in browser of a signed JAR.
    I would be interested to know if this is caused because I am using a not real certificate (generated for testing). Anyone with a real certificate may tell me if for example URLClassLoader works well with jar applet signed with his real certificate?
    Thanks, bye

    Thanks, you confirm what I was not anymore able to verify in my browser :)
    In fact the very first time I launched my applet in browser, the browser was showing a detailed message dialog pane complaining the untrustable certificate and restricted access privileges, so I thought to accept untrusted certificate as default and I tried to set up some options in security panel of the browser to trust untrusted certificate. Consequentely I was receiving only the untrusted certificate warning without any restriction message warning.
    I understood that applets signed with untrusted certificates gives some more privilege than applet not signed, but evidently the security level of untrusted certificate does not give all total priviliges that trusted certificate does.

  • .jar applet doesn't load deppending on the webserver...

    Hi all,
    I've got a little problem with an applet I'm trying to deploy... it's a signed applet I call from a HTML like this:
    <applet code="pack1.pack2.TheMain" width="975" height="575" archive="pack.jar" MAYSCRIPT>
              El navegador no deja cargar applets
    </applet>- pack1.pack2.TheMain is the main class name.
    - pack.jar is the jar containing all the classes with the correct packages definitons.
    If I put the index.html and the pack.jar files in an Apache webserver it loads correctly. (I understand that I ask for the html page, the browser sees that it needs a .jar file, it donwloads it, and tries to begin with TheMain.class).
    But I've tried to deploy with a very basic webserver, the implementation from http://www.opentcp.org/ . The html loads, it starts downloading the .jar, but when it has finished, the browser asks to the server for the TheMain.class file. Why??? it gives an error, because it's not in the server (there is only the .jar file with all files packed). The class should had been downloaded with .jar file, why does the browser ask it to the server?
    Perhaps some problem with headers.. mime types? I'm don't know much about this... do you now any reference?
    thanks a lot!

    thank you for your interest Peter... I'm a little confused, still working on it. I'll ask again later!

  • Getting ClassNotFoundException in Applet by using JDK1.6_20

    In my web application, we are using an applet which gets invoked from the jsp.
    Its working fine with jdk1.5 and 1.4 but when I am executing it on machine having JDK1.6_20 its throwing ClassNotFoundException. (Please see the log below)
    I cleared the cache and history but still getting this issue.
    I tried by switching off to Next Generation Java Plugin but still its not working.
    load: class com.idautomation.linear.BCApplet not found.
    java.lang.ClassNotFoundException: com.idautomation.linear.BCApplet
         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)
    Please provide the solution of it.

    am_mehra wrote:
    Hi,
    In my jsp, we have used the following lines to show an apple.
    <applet name="myApplet" width="390" height="105" align="Baseline">
    <param name="code" value="com.idautomation.linear.BCApplet">
    <param name="archive" value="LinearBarCode.jar">
    <param name="name" value="BarCodeApplet">
    <param name = "BARCODE" value = "<%= boOrderReturn.getString("return_no")%>">
    <param name = "CODE_TYPE" value = "CODE128">
    <param name = "BAR_HEIGHT" value = "2">
    <param name = "LEFT_MARGIN" value = "0">
    <param name = "TEXT_FONT" value = "ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>Looking at this in code tags, which makes things more clear, suggests various problems to me..
    <applet name="myApplet" width="390" height="105" align="Baseline">
    <param name="code" value="com.idautomation.linear.BCApplet">
    <param name="archive" value="LinearBarCode.jar">
    <param name="name" value="BarCodeApplet">
    <param name = "BARCODE" value = "<%= boOrderReturn.getString("return_no")%>">
    <param name = "CODE_TYPE" value = "CODE128">
    <param name = "BAR_HEIGHT" value = "2">
    <param name = "LEFT_MARGIN" value = "0">
    <param name = "TEXT_FONT" value = "ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>1) [Values for align|http://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG] can be bottom|middle|top|left|right. Note that none of those is 'Baseline'. You cannot just 'make up' HTML and expect it to work.
    2) The code and archive attributes should be in the applet opening element, not specified as params.
    3) Does that applet truly accept a 'name' param?
    4) The barcode param value looks suspiciously like it it is malformed.
    Fixing those things (barring point 4, but also removing the redundant spaces in the param elements) might result in something like..
    <applet
         name="myApplet"
         code="com.idautomation.linear.BCApplet"
         archive="LinearBarCode.jar"
         width="390"
         height="105"
         align="bottom">
    <param name="name" value="BarCodeApplet">
    <param name="BARCODE" value='<%= boOrderReturn.getString("return_no")%>'>
    <param name="CODE_TYPE" value="CODE128">
    <param name="BAR_HEIGHT" value="2">
    <param name="LEFT_MARGIN" value="0">
    <param name="TEXT_FONT" value="ARIAL|BOLD|11">
    <param name="scriptable" value="true">
    </applet>
    The above code is working in JDK1.4 and 1.5 but throwing classnotfoundexception.Did you mean ClasNotFoundException? If so, then please use the correct capitals, so there is no confusion. This is even more important on an international technical forum.
    I am not clear with the response "Change line 114, column 28 of the source from a '.' to a ','. All the problems should be gone." , kindly explain where I need to change this.That was commonly known as sarcasm. It meant I cannot fix code that I cannot see. That is why I requested you post the SSCCE (please read the link).
    It's an internal application not publicly available.OK - understood.

  • Multiple-jar applet question

    Here's a basic question that none of the examples seem to address. If my applet is comprised of multiple jars (some dynamically loaded based on system configuration), do they all have to be signed, or does just the jar file containing the applet entry point need to be signed?
    Conversely, could it be that only the jar files that contain code that wants to write files to the local file system need to be signed, or does everything need to be signed?

    Conversely, could it be that only the jar files that contain code that wants to write files to
    the local file system need to be signedThe Stack needs to be "trusted" code. If an unsigned applet "not trusted" calls a method
    of the signed applet it should not be allowed to do "trusted" things.
    One example is when you call a public method of the applet from javascript. There is a
    sollution other that signing all.
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post

  • WebLogic 10.3.5 ClassNotFoundException (jar file is available in classpath)

    Hi, I'm facing a problem on WLS10.3.5 + Spring 3.1 + Hibernate 3.6.7 connecting to Apache Derby 10.8.1.2.
    The Spring ContextLoaderListener configured in the web.xml is failing since the the entityManagerFactory creation failed - since the derby datasource defined in WLS could not be created. Root cause - ClassNotFoundException by the weblogic.utils.classloaders.GenericClassLoader. I've tried adding derbyclient.jar in all locations - WLS server lib, domain lib, WEB-INF/lib, VM_HOME/jre/lib/ext, and also tried setting PRE_CLASSPATH. Also tried keeping a duplicate copy of the jar in all the locations at the same time. No luck.
    Caused By: java.lang.ClassNotFoundException: org.apache.derby.client.am.ConnectionCallbackInterface
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    Truncated. see log file for complete stacktrace
    The datasource is created successfully from the console so there's no problem with the jar file. I could also load the above class using a test JSP from another bare WAR deployed into the same domain.
    I'm out of ideas and need some options to explore. btw, I specified in the weblogic.xml that the antlr.* classes should be taken from the application. Also tried this option for org.apache.derby.* classes.
    This looks like a buggy class loader problem. Any ideas or solution please?

    "The datasource is created successfully from the console so there's no problem with the jar file."
    Did you also test the data source when you created it?
    - when yes then WebLogic can indeed find the derbyclient.jar as the driver org.apache.derby.jdbc.ClientDriver is part of it.
    "I specified in the weblogic.xml that the antlr.* classes should be taken from the application. Also tried this option for org.apache.derby.* classes."
    Have you only defined a
    <prefer-application-packages>
        <package-name>antlr.*</package-name>
        <package-name>org.apache.derby.*</package-name>
    </prefer-application-packages>in weblogic.xml or did you also turn on prefer-web-inf-classes?
    It is smart to start from scratch and delete all the jar files in all the directories. To make the derbyclient.jar part of the WebLogic classpath you can do the following:
    - edit setDomainEnv: When you open setDomainEnv there is an entry like "SET THE CLASSPATH". Just before - if [ "${JAVA_VENDOR}" != "BEA" ] ; then
    you can put something like: CLASSPATH=${CLASSPATH}${CLASSPATHSEP}location/derbyclient.jar
    If the class must be available on every server in a cluster, you can edit the commEnv file (located in the ${WL_HOME}/common/bin directory)
    Search for the entry "set up WebLogic Server's class path". And below the WEBLOGIC_CLASSPATH you can add something like:
    WEBLOGIC_CLASSPATH=${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}location/derbyclient.jar
    Hope this helps you a little

  • ClassNotFoundException in Applets

    I get a ClassNotFoundException when displaying a web page with an Applet on it. It's a general problem with every site on the Internet, it does work when I use an Applet locally. I have the jdk1.4 plug-in installed and I'm using IE 5.5(SP2) on W2K in a network environment in my company. Any idea if that is a configuration/installation problem or has something to do with network/firewall?

    But why!?!?!
    I've noticed this as well, but would actually like to start using the Sun VM for applets in IE. Has anyone heard if this is an official bug? Is Sun going to fix this?!?

  • ClassNotFoundException in applet

    Hi,
    I have a class which contains:
    "Class.forName("oracle.jdbc.driver.OracleDriver");"
    If I run it using java myclass, everything is fine and
    the application gives a result set from Oracle.
    If I run it under applet, I got "ClassNotFoundException"
    error.
    Anyone can give a help?
    Thanks,

    What do you use to run the applet? Not the jdk's appletviewer, I suspect?

  • ResourceBundles in jars, applet, connection refused

    Hi,
    we run our code as application and as applet.
    We have a lot of ResourceBundle files (ListResourceBundles) which are archived per language (RBjars).
    The application and applet is in another package than the RBjars.
    An URLClassloader for loading the ResourceBundles is used which contains only the necessary language resource bundle jar file ( ResourceBundle.getBundle(resBundleName, locale, rbClassloader) ).
    When running as applet we get an exception (java.net.ConnectException: Connection refused: connect), although correct RBJar is loaded from server.
    When running as application we get same exception (java.net.ConnectException: Connection refused: connect),
    index and manifest used when archiving main package, but RBJars not in classpath of manifest, nor there are in the archive attribute of html of applet.
    If we define all RBjars in classpath of manifest (or in archive attribute), the applet allways load all RBjars, that cost too much time. This is the main problem.
    If anyone has an idea how to handle a lot of resource bundle jar files in an applet, please let me know.
    Thanks,
    Inge

    While one cannot say for sure, it looks like your problem is only tangentially connected with Java, jars, or applets. "Connection refused" means that there wasn't an HTTP server running at the address you gave to supply whatever file you asked for.
    It's probably a configuration or administration problem. Try typing the URL the program is using into your web-browser and see if you get the file.

  • How to use SSLSocket on a signed jar applet?

    Hello:
    OK, I finally could make work my client-server project, not the way I 'd like, but it works.
    Now the problem is this:
    Currently I have my applet in a jar file; saiCte.jar, which is signed in this way:
    keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
    jarsigner  -keystore TECSSDStore.keystore -signedjar  saiCte.jar  temp.jar  Key1  -storepass tttttt -keypass tttttt
    But signature is not useful for appletviewer, in my browser, I supposed that a signed applet would work, but it doesn't. There is a handshake problem. In the server it is:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    I have to run the applet this way:
    java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
    Cte.html is this:
    <applet    code = 'saiCte.class'  archive='saiCte.jar' width='750' height='480'>  </applet>So how could I make my signed jar work in the browser? I considered setting properties, but it worked, I would reveal my password. Currently the only way I know for distributing my applet is including the keystore and password, which is inadmissible, since I signed the jar (or why am I supposed to sign jars if anyway I have to send keystore and passwords?)
    Thanks!

    Questions:
    1. Are you using client authentication in this SSL setup?
    In the server I have this:
    Socket.setWantClientAuth(false);
    I guess if this option is false and the client chooses not to provide authentication information about itself, the negotiations will continue.
    I read in SSLSocket API docs for setUseClientMode that "Servers normally authenticate themselves, and clients are not required to do so. "
    2. What is in this keystore that you want to distribute?
    In my keystore there is only what can be produced with this:
    keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
    Now, I would have to distribute it if I want to run the applet from appletviewer:
    java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
    Which is the key of my problem: I do have a certificate, so I should not need to send the keystore and I should be able to run the applet from the browser. Actually it does run, the problem is in the connection:
    In the client: (from firefox's Java console:)
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at java.io.DataInputStream.readInt(Unknown Source)
         at r.a(Unknown Source)
         at X.actionPerformed(Unknown Source)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(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)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 23 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 29 more
    In the server:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
    at java.io.FilterInputStream.read(Unknown Source)
    at Tipos.TString.Read(TString.java:62)
    at saiSrv$ConsultaServidor.run(saiSrv.java:1045)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at java.io.DataOutputStream.writeInt(Unknown Source)
    at saiSrv$ConsultaServidor.<init>(saiSrv.java:1030)
    at saiSrv.<init>(saiSrv.java:970)
    at saiSrv.main(saiSrv.java:993)
    OK, thanks for the help, it's midnight in America, (you are in australia aren't you) so I'm going to the bed, can we continue chatting tomorrow?

  • Why some jar applet are cached and other don't?

    Hi all,
    i've an application with some signed applets.
    In some applets every update is immediately visible in Java console, in other applets i need to clear jar file stored in jvm cache to see my updates.
    Anybody knows how?
    Thanx a lot in advance
    Andrea

    Hi,
    tnx for you response. You are right, jars aren't downloaded until they ary modified.
    the problem is that in jvm cache these jar result expired (expire date is set to "yesterday") and i don't know why..
    if u pleas can help me...
    many thanx
    Bye
    Andrea

  • File permissions in .jar applet

    I'm trying to deploy an applet that runs from a .jar file that includes a plain text file that it needs to read. The applet loads fine except for reading that file -- I get the following error:
    java.security.AccessControlException: access denied (java.io.FilePermission capacities.txt read)
    I've tried including a policy file in the .jar, but I still get that error. Any ideas on what's going wrong?
    -Mandy

    It should work provided there is nothing wrong in ur code.
    here is a sample code i used for reading from a file within the applet's jar file. this however reads an object from a file. reading from a text file should not be much different.
         URL url=MyApplet.getClass.getResource("/Data.ser");
         URLConnection con=url.openConnection();
         InputStream in=con.getInputStream();
         ObjectInputStream objIn=new ObjectInputStream(in);
         MyClass myClass=(MyClass)objIn.readObject();
    regards
    Raees

  • Accessing JNLP & jars from webserver through IBM TAM via Webstart

    We have a swing application (running on Windows desktop) that is downloaded from a [Covalent] Apache webserver via webstart. However, when an IBM's Tivoli Access Manager (TAM) authentication server is introduced before the webserver, the webstart download fails since the TAM server is expecting the authentication ID & password. We are not clear on how webstart can provide this authentication information to the TAM server. The swing application uses JRE 1.5 and webstart version is 1.5.
    Has anyone gone through a scenario like this ? Any pointers that help resolve this issue will be greatly appreciated.
    Thanks.

    http://java.sun.com/docs/books/tutorial/deployment/webstart/security.html

  • Signing applets: Classnotfoundexception

    Hi everyone,
    I've created a web application that contains an applet as well. In that applet ,the user should be given the opportunity to open and save files from and to a directory on his own computer. I've read alot of things about signing applets to make that possible, but I haven't managed to get a working application yet.
    This is what I've done till now:
    I created a bat file containing the following script:
    set path=C:\Program Files\Java\jdk1.5.0_05\bin
    keytool -genkey -keystore applet\AppletKeystore -keyalg rsa -alias myApplet -storepass 123456 -keypass 789012
    keytool -selfcert -alias myApplet -keystore applet\AppletKeystore -storepass 123456 -keypass 789012
    keytool -export -keystore applet\AppletKeystore -alias myApplet -storepass 123456 -file applet\appletPublicKey.cer
    jar cvf applet\theContent.jar applet\*.class applet\appletPublicKey.cer
    jarsigner -verbose -keystore applet\AppletKeystore -storepass 123456 -keypass 789012 applet\theContent.jar myApplet
    htmlConverter templates.jsp
    I saved the file and I ran it. I got a keystore, a cer file and a jar file in my applet directory. So far so good, I guess.
    After that, I added an extra parameter in my jsp file so I get the following code:
    <jsp:plugin type="applet" archive="applet.theContent.jar" jreversion="1.5" code="applet.TemplateCreatorApplet.class" codebase="." width="1280" height="800" align="middle">
            <jsp:fallback>
                Plugin tag OBJECT or EMBED not supported by browser
            </jsp:fallback>
        </jsp:plugin>Then I copied the jar file and the jsp file to the webserver. When I run my application and I want to show the applet I get an error telling me that the TemplateCreatorApplet.class file can't be found. I don't understand why I get this error when all the necessary class file are supposed to be in the jar file. Can anyone help me???
    Thanks in advance,
    Plunofix

    Hi everyone,
    i manage to solve this problem. The Classnotfoundexception raised when the applet try to find the path of the class file.
    make sure when you create a jar file , you given a full path.
    For example, your class file located in the com/java/test/TestApplet.class. when you create a jar file please do in the root folder
    1. jar cvf TestApplet.jar com/java/test/TestApplet.class
    2. jar tvf TestApplet.jar
    It will display the complete path of class file.

Maybe you are looking for