Getting JAR file for Applet doesn't work

Hi,
We have the following problem: we have some clients who want to use our applet. There are some clients that have problems with receiving the .jar file:
When the applet tries to start we get a ClassNotFoundException: 'prestaties.class' not found. (the client wants to acces the class file directly from the server)
If we check the .jar file, it exists on the client, but the file is empty.
What could be the problem?
- PRoxy or firewall blocks the jar file
- applet doesn't have enough rights to write.
Does anyone a solution, some workarounds or suggestions for this problem.
Thanks!
Luk

Hi,
Thanks for answering my question!
Here is the extra information you asked.
At server side everything is OK (the jar file is present and has all the class files).
Where working with Weblogic server 4.51
The clients run JRE 1.3.0-C
I can't give you the applet code (confidential) but here is the html code:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="600" height="80" align="middle">
<PARAM NAME="cache_archive" VALUE="prestaties.jar">
<PARAM NAME="cache_option" VALUE="Plugin">
<PARAM NAME="cache_version" VALUE="1.4.2.1">
<PARAM NAME="code" VALUE="be.vdab.cvsesf.applet.prestaties.PrestatiesApplet">
     <PARAM NAME="codebase" VALUE="/lib">
     <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
     <PARAM NAME="scriptable" VALUE="true">
     <PARAM NAME="windowId" VALUE="185498422412000">
     <PARAM NAME="cursusId" VALUE="23178">
     <PARAM NAME="opleiding" VALUE="boetseren">
     <PARAM NAME="organisator" VALUE="TESTOE Omschrijving">
     <PARAM NAME="locatie" VALUE="TESTDOSSIER HELKPDESK / 0">
     <PARAM NAME="instructeur" VALUE="TESTDOSSIER HELKPDESK / 0">
     <PARAM NAME="WebLogicSession" VALUE="1">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3" width="600" height="80" align="middle"code="be.vdab.cvsesf.applet.prestaties.PrestatiesApplet"codebase="/lib"pluginspage="cvsesf/plugin.jsp"cache_option="Plugin" cache_version="1.4.2.1" cache_archive="prestaties.jar" windowId = "185498422412000"cursusId = "23178"opleiding="boetseren" organisator="TESTOE Omschrijving" locatie="TESTDOSSIER HELKPDESK / 0" instructeur="TESTDOSSIER HELKPDESK / 0"WebLogicSession="1">
<NOEMBED>
</COMMENT>           
          <html>
               <head>
                    <title>Java plugin download</title>
                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                    <link rel="stylesheet" href="../includes/vdabstyle.css">
               </head>     
               <body bgcolor="#FFFFFF">
               <TABLE width="600" border="0" cellpadding="1" cellspacing="0">
                    <tr>
                         <td>               
                              <h1 align="right"><b><font face="Verdana, Arial, Helvetica, sans-serif">Java plugin</font></b></h1>
                              <P><B>Voor het invullen van prestaties en vergoedingen heeft u de JRE 1.3 Java Plugin nodig: deze staat op de CD-ROM die u normaal gezien van de VDAB gekregen heeft.<br><br>
                              Ofwel kan u de plugin hier zelf downloaden (<U>opgelet:</U> bestand is 8 MB groot).<br><br>
                         U kan het VDAB callcenter contacteren om een CD-ROM aan te vragen of om problemen te melden. Het nummer vindt u onderaan het scherm.</B></p>
                         </td>
                    </TR>                    
               </table>               
               </body>
          </html>
     </NOEMBED>          
</EMBED>
</OBJECT>
Hope this helps.
Luk

Similar Messages

  • How to use packages and jar files for applet?

    Hi!
    My applet takes a class say a.class.
    Now this class depends on other classes that are packaged
    in a directory and put separately.
    I want to put this applet on the web.
    So how do I manage the .class files in he package.
    I have tried using jar file format.But I was not able to get it working.
    Can someone please help me?
    Thanks

    Use Archive instead of codebase:
    <APPLET CODE="MyApplet.class" ARCHIVE="MyApplet.jar" WIDTH=400 HEIGHT=300></APPLET>

  • Difficulty in getting jar files for jstl

    Dear dudes,
    I'm using tomcat 5.5 and i do want to work on jstl tags.
    So,i'm finding it difficult to get the jstl.jar, standard.jar files .
    I even went to jakarta site but somehow couldnot ping to the right url.
    So any help in this regard will be appreciated.
    Thanks!
    Note: My mail id is: [email protected] ( please send it to this id if you have those resources)_

    The download page for JSTL is here
    Its not that hard to find is it?

  • Can't get JAR file to work

    I am currently having problems getting the JAR file for my program to work properly. Here is what I'm doing in creating it and trying to run it:
    1.I create the JAR file with the command "jar cf myjar.jar *.class"
    2.I create a manifest file to point to the main class which contains only the line "Main-Class: MainClass". This is WITHOUT the .class extension
    3.I update the manifest for the jar archive with the command:"jar umf textfile myjar.jar"
    4.I try to run the app with the command "java -jar myjar.jar" but this only gives me an error that says "Failed to load Main-Class manifest attribute from
    myjar.jar"
    Am I doing something wrong here? I've tried to make my steps as close as possible to those that I read in the tutorials, but it's still not coming out for some reason. My computer does recognize the file as a JAR though since it made an icon of a JAR file for it. Please note I made up names for both my jarfile and main class file for privacy reasons, but I do not think the specific names would make much of a difference in this as they contain no special characters or anything in the file names.

    Hmm....I tried both of your tips javagalaxy and tsith by making the file look as javagalaxy posted as well as renaming it to "manifest.mf" and putting it in a "META-INF" folder that is in the same directory as all my .class files. I also made sure I hit Enter twice so that there was a blank line between the Main-Class line of the file. When i run the command it displayed "added manifest" as well as all the class names that I needed to be in the jar file including the main one that I'm trying to invoke. Despite all of that I'm still getting the same error that it can't load the main-class attribute from the jar file when using the command "java -jar myjar.jar" =/. I'm not really sure what went wrong. I tried deleting the extra line so that the cursor was flashing right below the Main-Class line, but that didn't change anything when I re-ran the commands. Did I do something else wrong in the manifest file? Thanks for your help so far! This is some complicated stuff the first time one tries it.

  • Jar files for Didgital Signing

    Hi All,
    I have a requirement where I need to Access to Keystore for Digital signing an XML payload. I am using the example in the SAP help link - Link: [Using Digital Signatures|http://help.sap.com/saphelp_nw04s/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/frameset.htm] 
    I have already imported the following jar files (aii_af_cci.jar,aii_af_cpa.jar,aii_af_mp.jar, aii_af_ms_api.jar, aii_af_ms_spi.jar, aii_af_svc.jar, aii_af_trace.jar, aii_security_lib.jar, aii_security_interface.jar, iaik_jce.jar, tc_sec_ssf.jar).
    The code has the following import statements:
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    import com.sap.aii.af.service.auditlog.*;
    import com.sap.aii.af.service.resource.SAPSecurityResources;
    import com.sap.aii.security.lib.KeyStoreManager;
    import com.sap.aii.security.lib.PermissionMode;
    import com.sap.security.core.server.ssf.SsfProfileKeyStore;
    import com.sap.security.api.ssf.ISsfProfile;
    import java.io.UnsupportedEncodingException;
    But even after the above imports I am still getting errors in resolving the following variables in the code.
      KeystoreManager
      keyStore
    What are import statements or jar files I am missing? and where can i find those jar files for making the example work?
    Thanks and Regards,
    Arunava
    Edited by: Arunava Das on Jun 6, 2008 7:05 PM

    Hi All,
    Im working on code which has
    import com.sap.security.api.ssf.ISsfProfile
    But i couldn't find the jar file for that. I think the the package is "com.sap.security.api.ssf".
    Please help me out, where can i get that jar file...?
    Warm Regards,
    DNK Siddhardha.

  • Virus scan failed Error on deploying a web application having a jar file for calling the applet on the jsp page

    Hi,
    I have an applet application that i want to deploy on the Oracle cloud.
    So i have created a jar file for the applet application and i am using this jar to call the applet on a jsp page.
    But when i am delpoying my application on the java cloud, its giving me the below error:
    2014-10-28 03:16:41 CDT: Starting action "Virus Scan"
    2014-10-28 03:16:41 CDT: Virus Scan started
    2014-10-28 03:16:49 CDT: ----------------------------------------------------------------------
    2014-10-28 03:16:49 CDT: File Scanned: "Application7.ear".
    2014-10-28 03:16:49 CDT: File Size: "106698122".
    2014-10-28 03:16:49 CDT: File Status: "INFECTED".
    2014-10-28 03:16:49 CDT: ----------------------------------------------------------------------
    2014-10-28 03:16:49 CDT: Virus scan failed.
    2014-10-28 03:16:49 CDT: "Virus Scan" complete: status FAILED
    Can't we deploy any application having applet or swing component's onto the cloud?
    Or do we need to request for any extra permissions for the same?
    Thanks,
    Manoj

    I don't see applets mentioned in the supported features nor in the unsupported features so not sure if they are supported you would likely need to contact the operations team to confirm.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Where i will get  the .jar files for JDBC connector for MSSQL Server

    Hi,
    i am trying to configure the JDBC connector for the MSSQL server. For this we need to add the .jar files for MSSQL Server. Can any body tell , where i will will get the jar files to finish this connection.
    Database version is MS SQL Server 2000
    Portal version is       Portal7.0 sp9
    Regards
    vijay

    Hi Vijay,
    If you are looking for the exact steps as to how we can configure the JDBC Connector for accessing the MS SQL Server, have a look at this document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10
    Follow the steps till page 12 of this doc.
    Bye
    Ankur
    Do reward points for helpful as well as solved answers!!

  • Help me out to get the jar files for FileUpload using MyFaces.

    hi,
    Can anyone help to get the jar files for FileUpload using MyFaces.
    I want myfaces-extensions.jar and commons-fileupload-1.0.jar.
    Thank you.

    you can't control the speed of a for-loop.
    you can remove your code from a for-loop and use a function to execute the code in your for-loop and you control how frequently you call the function.

  • Include an in-memory jar file for JSR-199 compilation

    I want to compile a source file in memory, which requires a jar file that is also represented in memory. I used the JavaSourceFromString class recommended in the documentation for the class JavaCompiler and in a demo I found online that shows how to compile sources represented as String in memory. To represent the jar file, I used a similar trick to JavaSourceFromString:
    public class JarJavaFileObjectFromByteArray extends SimpleJavaFileObject {
       * The contents of this jar file.
      private final byte[] contents;
       * Constructs a new JarJavaFileObjectFromByteArray given the name and binary
       * contents of a jar file.
       * @param name the name of this jar file
       * @param contents the contents of this jar file
      public JarJavaFileObjectFromByteArray(String name, byte[] contents) {
        super(newURI(name), Kind.OTHER);
        this.contents = contents;
      ... // code not shown ensures that the URI returned from newURI is of the form,
          // for instance, bytes:///MathConstants.jar, if the name of the jar file is MathConstants.jar
      @Override
      public InputStream openInputStream() throws IOException {
        return new ByteArrayInputStream(contents);
    }However, I do not know how to alert the compiler that this jar file should be on the classpath. I tried this:
    List<String> options = Arrays.asList(" -classpath bytes:///MathConstants.jar ");
    CompilationTask task = compiler.getTask(null, fileManager, null, options, null, compilationUnits);but I get the following error when calling getTask:
    java.lang.IllegalArgumentException: invalid flag: -classpath bytes:///MathConstants.jarI assume there is some way to tell the compiler, "look at the MathConstants.jar file that I am storing in memory when searching the classpath", but I do not know how to do this. I assumed that the options parameter for getTask represents command-line flags that would be passed to the compiler if this were happening on the command line (such as "-cp .", which also does not work), but perhaps this assumption is wrong.

    Hi Bruce,
    I have a question regarding loading a jar file by the compiler to dynamically compile with a source file. I hope you can probably offer me an idea on what has been missing or wrong with the source codes I have written for my application.
    I am using Eclipse compiler to dynamically compile a class. In the class, I want it to make a reference to a jar file for compilation dynamically.
    Here is the source of a test class I wrote:
    import javax.servlet.http.HttpServlet;
    class MyServlet extends HttpServlet {
    }The import statement refers to the class javax.servlet.http.HttpServlet from the jar file C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\lib\\servlet-api.jar placed in the file system.
    In the method called compileClass (shown below), I used the path of the jar file to add to the option -classpath as you suggested.
         private static CompileClassResult compileClass(Writer out, String className, String classSource) {
              try {
                   JavaCompiler javac = new EclipseCompiler();
                   StandardJavaFileManager sjfm = javac.getStandardFileManager(null, null, null);
                   SpecialClassLoader scl = new SpecialClassLoader();
                   SpecialJavaFileManager fileManager = new SpecialJavaFileManager(sjfm, scl);
                   List<String> options = new ArrayList<String>();
                   options.addAll(Arrays.asList("-classpath", "C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\lib\\servlet-api.jar"));
                   List<MemorySource> compilationUnits = Arrays.asList(new MemorySource(className, classSource));
                   DiagnosticListener<JavaFileObject> diagnosticListener = null;
                   Iterable<String> classes = null;
                   if (out == null) {
                        out = new PrintWriter(System.err);
                   JavaCompiler.CompilationTask compile = javac.getTask(out, fileManager, diagnosticListener, options, classes, compilationUnits);
                   boolean res = compile.call();
                   if (res) {
                        //Need to modify the api to return an array of two elements - one classes and other bytecodes for all classes in the same class file.
                        return CompileClassResult.newInstance(scl.findClasses(), scl.findByteCodes());
              } catch (Exception e) {
                   e.printStackTrace();               
              return null;
         }I also extended the class ForwardingJavaFileManager as you suggested and have it delegated to the StandardJavaFileManager sent to the compiler mentioned in the method compileClass above. The extended class (called SpecialJavaFileManager) is as follows:
    public class SpecialJavaFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> {
         private SpecialClassLoader xcl;
         public SpecialJavaFileManager(StandardJavaFileManager sjfm, SpecialClassLoader xcl) {
              super(sjfm);
              System.out.println("SpecialJavaFileManager");
              this.xcl = xcl;
         public JavaFileObject getJavaFileForOutput(Location location, String name, JavaFileObject.Kind kind, FileObject sibling) throws IOException {
              System.out.println("getJavaFileForOutput");
              MemoryByteCode mbc = new MemoryByteCode(name);
              xcl.addClass(name, mbc);
              return mbc;
         public Iterable<JavaFileObject> list(JavaFileManager.Location loc, String pkg, Set kinds, boolean recurse) throws IOException {
              System.out.println("list ");
            List<JavaFileObject> result = new ArrayList<JavaFileObject>();
            for (JavaFileObject f : super.list(loc, pkg, kinds, recurse)) {
                 System.out.println(f);
                result.add(f);
              return result;
    }I run the application and the result shows that it didn't load the jar file into the memory as expected. From the output (below) I got, it doesn't seem to invoke the method list(...) in the class SpecialJavaFileManager.
    SpecialJavaFileManager
    1. ERROR in \MyServlet.java (at line 1)
         import javax.servlet.http.*;
                ^^^^^^^^^^^^^
    The import javax.servlet cannot be resolved
    2. ERROR in \MyServlet.java (at line 3)
         class MyServlet extends HttpServlet {
                                 ^^^^^^^^^^^
    HttpServlet cannot be resolved to a typeWould you please let me know what has possibly be missing or wrong?
    Thanks.
    Jonathan
    Edited by: jonathanlam on Aug 10, 2009 6:47 PM

  • Cant get JAR file to execute

    I'm developing an application in using JDK 1.2.1 and Borland/Inprise's JBuilder Professional version 3.0 (the OS is MS windows 98).
    My program is an application , not an applet.
    My program runs OK from the jbuilder development environment, but now I want it standalone , as a .JAR file. Using jbuilders deployment wizard, I've created a .JAR file for my program ("untitled2.jar).
    It includes a manifest.
    I set up a test subdirectory c:\test and copied all the files from c:\program files\javasoft\jre\1.2\bin (which includes java.exe and javaw.exe). I then copied untitled2.jar to c:\test
    I've looked in books & searched on the web site and I've tried various permutations of the syntax. For example I tried :
    java -jar -cp c:\test untitled2.jar
    but get the error message:
    "Failed to load Main-Class manifest attribute from untitled2.jar"
    Have I just got the syntax wrong or am I missing something else?
    Also do I understand right that JRE.EXE has been replaced with JAVA.EXE (and JREW.EXE with JAVAW.EXE) ?
    thanks in advance for any help
    Mike

    Thanks for the replies. I tried what you said :
    I've replaced "untitled2.jar" with "loofabtest.jar" (actual name of the program)
    The program is 2 java source files (loofabtest.java and frame1.java) , the main file is contained in
    public class loofabtest within in loofabtest.java. The JAR file created is called loofabtest.jar
    As I said previously the program runs OK from within jbuilder. All files & class names are lower case.
    I used winzip (version 7.0) to open loofabtest.jar.
    When I open loofabtest.jar there is a file called Manifest.mf with a path:
    meta-inf\
    when I open that there is NO line
    Main-Class: my.main or similar
    So I edit the Manifest.mf file & added a line :
    Main-Class: loofabtest
    Query 1: is this syntax right or should the line read: Main-Class: loofabtest.class
    after editing the file , when I save it I get an overwrite option , if I say no , I end up with 2 manifest files (which I think wont work) If I yes to overwrite , the file loses the
    meta-inf\     
    path (i.e. there is no path)
    I tried editing the manifest in jbuilder , but with no luck (jbuilder autogenerates the manifest)
    I also tried extracting all the files in the JAR , editing the manifest , then rearchiving them. I get the error message
    java.io.IOException: invalid manifest format
    at java.util.jar.Manifest.read(Compiled Code)
    at java.util.jar.Manifest.<init>(Manifest.java:55)
    at sun.tools.jar.Main.run(Main.java:87)
    at sun.tools.jar.Main.main(Main.java:760)
    Query 2 : Is there an easy way to edit the manifest file to add the line needed and keep the meta-inf\ path?

  • Jar files and applet

    My applet class is using other classes in my package,
    So do i need to create a jar file and specify that jar file in <applet archieve = :myjar.jar"
    I did created the jar file , but its not loading up, the browser just says Loading java applet, what might be the reason, does it depends on size of jar file?
    or my tags are wrong.
    my applet tag is
    <html>
    <applet archive = "myjar.jar"
    code = "front.class"
    width.. >
    the front.class file is also in myjar.jar.
    Any help....
    Also one more question,
    Can i call other applets within one applet class.
    I have a gui, when a particular button is clicked on applet
    i want to go to other applet, so how should i call it in that buttons action listner?
    And in my applet class i am using one other class from my package which actually coonects to databse through JDBC. now say i have a button on my applet whihc says "Connect", and when that button is clicked then I created object of my other class which makes connection
    through databse. So will this work from applet?
    Thanks

    You didn't show all of your applet tag, but it should look like this:
    <HTML>
    <APPLET CODE = front.class, ARCHIVE = myjar.jar, width = ???, height = ???>
    </APPLET>
    </HTML>
    Assuming your applet is not crashing, this should load it. I recommend using the appletviewer tool in the JDK, it provides more detailed error messages. I hope this works for you.
    Now inter-applet communication. This is forbidden, sorry. However, if you really want to get fancy; remember that all applets can communicate back to the host from which they came. So if you want to build a small server on your host machine which all your applets log into, they can then communicate with each other through the server.

  • Jar file in applet not saved in internet files when using jdk plugin

    Hello,
    I recently upgarded to jdk1.3.1 and converted our applet and classes to jdk1.3.1 using swing classes. From there, we converted the html file with htmlconverter and diployed this on the web. When a user goes to the web, the system automatically downloads the java plugins and installs them on the clients maching. From there our jar file loads and executes. Our applet runs fine. However, every time our website is accessed, our jar file cookie must be downloaded which is just over 1meg and I know this is not going to fly with our clients.
    What needs to be done so the jar file is not downloaded every time, to work like java version 1.x ?
    Thanks for your help in advance with this one.
    Jay Ford

    Hi Jay Ford,
    Enable the "Recycle Classloader" in Control Panel-->Java Plug-in1.3.1-->Basic.
    The main purpose of this Recycle classloader is it will enable the "javaplugin.classloader.cache.enabled" property to true and it caches the jar files for performance enchancement.
    Hope this will help you.
    Anil.
    Developer Technical Support,
    Sun Microsystems Inc,
    http://www.sun.com/developers/support

  • Ess_japi.jar files for Essbase 11x version

    Hi All,
    We are working on upgrade Essbase upgrade from 7x version to 11x and found there is an ess_japi.jar file which is being used for Web based application.
    Do we need to get the new version of the JAR files for the 11X version?
    Thanks and regards
    Pancha

    Hey John,
    I am newbie to Essbase and when i was going to all the configuration files we found that these Jar files are being deployed in the EDS folders and was just curious when are installing the ESSBASE version 11x.. EDS folder and also associated files also get loaded into server?
    Thanks for your reponse.

  • Download and extract jar file from applet

    Can any one provide me a solution for my below problem. Thanks in advance for all the suggestions.
    I want my applet to download a jar file, extract into users home directory by creating a folder and then set the created folder to java library path.
    My applet html file is in "root" directory. The applet is included into applet.jar and placed under "lib" directory which is under "root" directory.
    Now i also had another jar file(contains dlls what I packed) under the same lib folder.
    The below is the following directory structure in my server.
    root ---
         |
         |
         default.html
         lib--
         |
         |
         applet.jar - contains applet related classes
         native.jar - contains dlls which are to be loaded
    When a client downloads my applet, it should copy the native.jar and then extract into a new folder under user home directory. Then set this folder to java library path.
    Regards
    raman kumar

    I managed to do it this way, Just remember that you need to sign the jar files for your applet, else it won't work.
    package jar.extract;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.jar.JarFile;
    import java.util.zip.ZipEntry;
    public class JarExtractor {
         // Dll file in the jar
         private static String JAR_FILE = "dll.jar";
         public void extract() {
              try {
                   JarFile jf = new JarFile(JAR_FILE);
                   // Entry in the jar file rember package and dll file
                   ZipEntry ze = new ZipEntry("package/dll_file");      
                   int length = (int) ze.getSize();
                   byte fileContent[] = new byte[length];
                   InputStream fin = jf.getInputStream(ze);
                   fin.read(fileContent, 0, length);
                   // CODE missing.
                   // You need to write the input stream (fin) to a new files output stream
                   // it is like copying a file !!!
              } catch (IOException e) {
                   e.printStackTrace();
    }Tom

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

Maybe you are looking for