Class-Path problem in MANIFEST.MF file

Hello,
I have one jar file in which defined class-path like this:
%programfiles(x86)%/%OPENOF~1.ORG%/Basis/program/classes/officebean.jar
but with no luck , system says following:
Class Path entry %programfiles(x86)%/%OPENOF~1.ORG%/Basis/program/classes/officebean.jar  does not point to a valid jar for a Class-Path referenceI even tried
C:\Program Files (x86)\OpenOffice.org 3\program\classes\officebean.jarbut error is same, i can not understand what's wrong, i have windows 7 x64 with jdk 1.6.24 , also java home is set

http://en.wikipedia.org/wiki/Classpath_(Java)#Setting_the_path_in_a_Manifest_file explains it well.

Similar Messages

  • Unable to read Class from META-INF/MANIFEST.MF file

    Hi,
    One of my EJB Bean is referencing a class file "test.class".
    So, I placed the test.class file under app-servers's
    "<root-dir>/lib/test.class". And added this in MANIFEST.MF file under "Class-Path" property.
    But the app servers is not recognising this Class and displaying "NoClassDefFoundException".
    Any help is appreciated.
    Thanks in advance

    If it is saying this abt main MIDlet class then it is
    a JAD file problem. try to check "MIDlet-n" attibute
    (including package info if any).Yes - the KToolbar project/package updates the jad file as well as creating the jar file.
    Cheers

  • Applet with class path Problem

    Hi all,
    I am facing a strange problem: I wrote an applet and sign it tomake it able to access some client resources, my applet is intended to play audio mp3 files, so I need some libs like jmf.jar, if my libs do not exist I recieve them from my web app via URLConnection to servlet.
    after libs download completing, I can not instantiate any of libs class because my libs do not exist in the class-path.
    I need any suggestion. what can I do?
    1 - change the class path - during run time - to point to the current libs location.
    or
    2 - load the jar libs manually - during run time - and instantiate my classes.
    or what?
    please include examples.
    Thanks
    Ahmad Elsafty

    PATH and CLASSPATH are different. PATH is an environment variable used by windows to locate programs. CLASSPATH is an environment variable that java uses to find classes.
    You need to create a new environment variable. The easiest way to do it in win2k (and to keep it after you reboot) is to do this: right click on "My Computer" and click "Properties" (or go to "System" in the control panel). Click on the "Advanced" tab. Click the "Enviroment Variables..." button. In that window, add a system variable by clicking "New..." in the bottom half. Variable Name: "CLASSPATH" Variable Value: ".;J:\Skribe\Tools\mysql-connector-java-3.0.0-beta\mysql-connector-java-3.0.0-beta-bin.jar;J:\jakarta-log4j-1.2.6\dist\lib\log4j-1.2.6.jar"
    You have to make sure that ".;" is the first thing on the line. This tells java to look in the current active directory first for classes it doesn't recognize, then in locations you specify. By default, it just looks in the current directory.
    Hope this helps.

  • EAR + EJB + Spring Class-Path problem

    Hi,
    I'd been using JDeveloper for a few years, but this is the firstime I package an EJB application. I have two jars (the ejb.jar and api.jar) both are using the Spring 2.0 Library that JDeveloper provides.... but when I package the EJB as an EAR everything seems to be OK:
    -ear
    - META-INF
    - application.xml
    - ejb.ar
    - api.jar
    - spring.jar
    But when I try to publish the EAR in the OC4J standalone management console, this error is thrown:
    oracle.classloader.util.AnnotatedNoClassDefFoundError:      Class not found: org.springframework.ejb.support.AbstractStatelessSessionBean.     Dependent Class sv.com.sti.ebs.sgd.ejb.SgdTrxSessionBean
         Cargador: sgd-ear.root:0.0.1
    (Failure analysis caught java.lang.NullPointerException)
    So I Think the ejb is not using the spring libraries located in the EAR's root or maybe I have to add the classes to the ejb's manifest.....But JDeveloper ejb jar deployment doesn't add any entries in the Manifest Class-Path entry....
    Please Help.

    Hi
    Try putting the utility classes in an EJB JAR file, then putting a Class-Path attribute in the MANIFEST.MF for that JAR far. That is
    Class-Path: lib/myutils.jar
    It doesn't matter where you put the utility JAR, so long as it's somewhere in the EJB JAR and you specify it in Class-Path. This should make the utility classes accessible to servlets as well. Note that classes defined in a WAR file's ./lib directory willl not be accessible to EJBs, as a matter of policy.
    Best wishes
    Kevin

  • Class path problem in Sun Studio Creator

    dear,
    I have Sun Studio Creator 30 days Trail. i can't compile the EJB Classes. Is there any class path setting in the IDE?. Help me to solve the problem. the EJB class javax.ejb.* package is not found. I am using the deployment server (Sun Application Server 8.0 this could deployed the example files written for EJB. i don't guess what is the major problem.

    http://en.wikipedia.org/wiki/Classpath_(Java)#Setting_the_path_in_a_Manifest_file explains it well.

  • Path problem for "Load VRML File.vi" in EXE

    Hello,
    The new integrated 3d Picture Control functionality in LabVIEW 8.20 is amazing.  It is a really easy to use implementation of OpenGL.  I've discovered one bug/issue when building VI's to an exe that includes the 3d Picture Control:
    If "Load VRML File.vi" is used, in the executable, you will encounter a LabVIEW Error 7 due to a path problem in the following vi:
    NI_3D Picture Control.lvlib:Load VRML File.vi->NI_3D Picture Control.lvlib:NI_Old 3D Toolkit.lvlib:Read WRL file.vi->NI_3D Picture Control.lvlib:NI_Old 3D Toolkit.lvlib:Initialize.vi
    The File Not Found problem will prevent the vrml file from loading.  Navigating down into the subVI's of the "Load VRML File.vi" shown above easily reveals the problem.  I've included a screenshot of the diagram of that VI.  The relative
    path resulting from the double "Strip Path" operation is not valid
    in the executable.  I'm not sure where that "definitions" file resides
    in the runtime deployment or if it's even included, so fixing the path to account for the differences in the exe vs. development environment path is not an option.   I'm also usually very hesitant to make any mods to anything in vi.lib.
    For the development environment, the "definitions" file can be found at: [LabVIEW 8.2 dir]\vi.lib\picture\3D Picture Control
    The easy fix is to include the "definitions" file in the same directory as your exe when you build.  Fortuitously, this does the trick because the first strip path gives the path to the exe and then the second strip path results in the path to the directory where the exe resides.
    Hopefully NI will fix this path reference properly in future revisions.
    Enjoy!
    Attachments:
    WRL Debug.jpg ‏77 KB

    Hi Chris,
    Thanks a lot for the feedback!  This was reported to R&D (# 47F9DJIQ) for further investigation.
    Regards,
    Justin D

  • Path problem while refering the file in tomcat

    In the jsp file i am going to update one property file which resides in the same folder using file output stream.
    it gives path problem.how can refer the path of that file

    try using getServletContext().getRealPath(java.lang.String path)..You can check out the API for more detail regarding this method.

  • Class path problem with POJO web service

    I created a simple web service manually:
    - created java class;
    - generated web-services.xml
    - coplied web-services.xml into my *.war file, WEB-INF directory.
    This works fine as long as the class that implements web service is in the war file in folder /WEB-INF/classes.
    I need the java class to be in one of the jar files in the folder /WEB-INF/lib. This does not work. I am getting class not found error.
    I tried to modify <java-class> element to specify the jar file (the same way as ejb-link element does):
    <java-class class-name="my.jar#my.Service" name="MyService">
    </java-class>
    This did not help either. How can I specify name of POJO class in the *.jar file?
    Thanks,
    Serguei

    PATH and CLASSPATH are different. PATH is an environment variable used by windows to locate programs. CLASSPATH is an environment variable that java uses to find classes.
    You need to create a new environment variable. The easiest way to do it in win2k (and to keep it after you reboot) is to do this: right click on "My Computer" and click "Properties" (or go to "System" in the control panel). Click on the "Advanced" tab. Click the "Enviroment Variables..." button. In that window, add a system variable by clicking "New..." in the bottom half. Variable Name: "CLASSPATH" Variable Value: ".;J:\Skribe\Tools\mysql-connector-java-3.0.0-beta\mysql-connector-java-3.0.0-beta-bin.jar;J:\jakarta-log4j-1.2.6\dist\lib\log4j-1.2.6.jar"
    You have to make sure that ".;" is the first thing on the line. This tells java to look in the current active directory first for classes it doesn't recognize, then in locations you specify. By default, it just looks in the current directory.
    Hope this helps.

  • Class path problem

    Hi,
    i installed j2sdk1.4.0 in my PC.
    And i set path in environment variables
    JAVA_HOME
    the path of j2sdk and saved..
    now when i go to comman promt and say javac
    its not idetifying..
    then iam setting classpath and path at command prompt..
    then javac working.
    that means if set java home the class path it wont take automatically..
    we have to set again at our desired location.
    Regards,

    Adding JAVA_HOME variable to the system is not enough, you need to add the %JAVA_HOME%/bin to your system path
    Add following to your system's path variable
    %JAVA_HOME%/bin;
    (i assume you have windows OS)

  • Linux class path problem

    hello,
    I have the following directories in my /home/user/project directory
    /resources (contains .jar files)
    /builds/version01 (contains the .class files)
    Does anyone know how to run the .class files? I have tried various combinations in linux and I get errors either about the classpath. The thing is also that I want to load the .jar files from /resources at the same time
    Thanx ...
    Rigas

    hello,
    I have the following directories in my
    /home/user/project directory
    /resources (contains .jar files)
    /builds/version01 (contains the .class files)
    Does anyone know how to run the .class files? I have
    tried various combinations in linux and I get errors
    either about the classpath. The thing is also that I
    want to load the .jar files from /resources at the
    same time
    Thanx ...
    Rigasif you have root permissions edit the /etc/profiles file and add the classpath there. Make sure to point it to all of the jar files explicitly... i.e. /home/somefolder/somejar.jar
    if not there is a profile somwhere in you r home directory that you can edit

  • Java 5.0 does not recognize wrapped Class-Path in Manifest.MF of .jar file?

    Java: build 1.5.0_05-b05
    Ant: 1.6.2
    I use Ant <jar> task to create a standalone application in a .jar file. I have a very long "Class-Path" in the Manifest.MF file. The long Class-Path is wrapped at every 70th character by the <jar> task. I cannot run "java -jar <the jar file>", because Java runtime cannot find classes.
    I found the following Q&A from ANT's FAQ page,
    Q: Whenever I use the Ant jar or manifest related tasks, long lines in my manifest are wrapped at 70 characters and the resulting jar does not work in my application server. Why does Ant do this?
    A: Ant implements the Java Jar file specification. Please refer to the notes section where it discusses the maximum allowable length of a line and the concept of continuation characters.
    If a jar file produced by Ant does not work in your appserver, and that failure is due to the wrapped manifest, then you need to consult your appserver provider, as it is a bug in their appserver. Far more likely, however, is a problem in your specification of your classpath. It is not Ant's wrapping of your classpath that is the problem.
    Do not raise a bug about this issue until you have checked to ensure that the problem is not due to your classpath specification.
    Any idea?

    "will be searched ALSO."...
    From: http://java.sun.com/docs/books/tutorial/ext/basics/load.html
    Understanding Extension Class Loading
    The extension framework makes use of the new class-loading mechanism in the JavaTM 1.2 platform. When the runtime environment needs to load a new class for an application, it looks for the class in the following locations, in order:
    1. Bootstrap classes: the runtime classes in rt.jar and internationalization classes in i18n.jar.
    2. Installed extensions: classes in JAR files in the lib/ext directory of the JRE.
    3. The class path: classes, including classes in JAR files, on paths specified by the system property java.class.path. If a JAR file on the class path has a manifest with the Class-Path attribute, JAR files specified by the Class-Path attribute will be searched also.
    [snip]

  • How to use Class-Path in Manifest file

    hi,
    I want to add jar files in another executable jar file but the Class-Path in Manifest file is not set correctly,please give an example for setting a Class-Path attribute in Manifest class.
    regards,
    selvaraj

    You looked into the Jar section of the Sun tutorial did you?

  • Class-path manifest attribute

    Hi,
    I have a session bean, that references some external classes. I am deploying the
    application as a ear file. The session beans are stored in a jar file and the
    external classes are stored in a separate jar file. Both the jar files go into
    an ear file. The manifest of the session bean jar file defines the relative URI
    of the other jar file using the Class-path attrtibute. I use JDK 1.3.1. However,
    when I try to deploy the ear, WLS complains about not being able to find the extermal
    class. I use WLS 6.1. This is driving me nuts, any help would be highly appreciated.
    I have attached the EAR file.
    Thanks
    Meeraj

    I was wondering as to why was this constraint placed on EJB's in
    weblogic(that Class-Path can't be used in manifest). After all EJB jar is
    also a jar file, and as what java extensions mechanism dictates, any jar
    file can utilize this feature.
    and how the code would the loadClass/findClass method in the classloader
    look like of I were to disable this feature (like what weblogic currently
    behaves....)
    any thoughts!!!
    - Rajeev Dave
    "Deepak Vohra" <[email protected]> wrote in message
    news:[email protected]...
    Manifest Class-Path
    Use the manifest file to specify that a JAR file can reference another JARfile.
    Standalone EJBs cannot use the Manifest Class-Path. It is only supportedfor
    components that are deployed within an EAR file.
    To use the manifest file to reference another JAR file:
    Specify the name of the referenced JAR file in a Class-Path header in the
    referencing JAR file's Manifest file.
    The referenced JAR file is named using a URL relative to the URL of the
    referencing JAR file.
    Name the manifest file META-INF/MANIFEST.MF in the JAR file
    The Class-Path entry in the Manifest file is as follows:
    Class-Path: AAyy.jar BByy.jar CCyy.jar.
    Meeraj wrote:
    Hi,
    That is not what I want to do. I had got similar stuff working fine with
    JBoss
    by resolving dependencies using Class-path manifest attribute.
    Thanks
    Meeraj
    Deepak Vohra <[email protected]> wrote:
    Add the external classes to the Sessions Bean jar.
    Meeraj Kunnumpurath wrote:
    Hi,
    I have a session bean, that references some external classes. I amdeploying the
    application as a ear file. The session beans are stored in a jar fileand the
    external classes are stored in a separate jar file. Both the jar
    files
    go into
    an ear file. The manifest of the session bean jar file defines therelative URI
    of the other jar file using the Class-path attrtibute. I use JDK
    1.3.1.
    However,
    when I try to deploy the ear, WLS complains about not being able tofind the extermal
    class. I use WLS 6.1. This is driving me nuts, any help would be
    highly
    appreciated.
    I have attached the EAR file.
    Thanks
    Meeraj

  • Jar doesn't populate Class-Path from manifest to target .jar

    I have a manifest file with the following content:
    Manifest-Version: 1.0
    Name: webserver.jar
    Main-Class: Acme.Serve.Serve
    Java-Bean: False
    Class-Path: webserver.jar servlet.jarHowever result META-INF/MANIFEST.MF populated by jar in webserver.jar doesn't have Class-Path entry. What's the trick without manual editing MANIFEST.MF in .jar?

    The following extension of the class Bar.java will at least get the information from the jar file.
    package bar;
    import foo.Foo;
    import java.io.File;
    import java.io.IOException;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Set;
    import java.util.jar.Attributes;
    import java.util.jar.JarFile;
    import java.util.jar.Manifest;
    public class Bar {
      public static void main(String[] argv) {
        try {
          String classpath = Foo.getPath();
          System.out.println("java.class.path=" + classpath);
          if (!new File(classpath).isDirectory()) {
         JarFile f = new JarFile(classpath);
         Manifest mf = f.getManifest();
         Attributes a = mf.getMainAttributes();
         Iterator keys = a.keySet().iterator();
         while (keys.hasNext()) {
           Attributes.Name key = (Attributes.Name)keys.next();
           String value = a.getValue(key);
           System.out.println(key + "=" + value);
        catch (IOException ioe) {
          System.err.println("Error: " + ioe.getMessage());
    }

  • WAR, MANIFEST.MF and class-path to jars

    Hello,
    I have a WAR shared library shared.mylib consisting of a series of JARs in a WAR:
    /WEB-META/
    MANIFEST.MF
    /WEB-INF/
    lib/
    lib1.jar
    lib2,jar
    in the MANIFEST.MF I don't need to specify any Class-Path, since lib/ is considered by default and classes are loaded.
    However I need a way to load classes from other directories in the WAR (without specifiying each jar if possible).
    I have tried all the possibilities with Class-Path in the MANIFEST, but nothing works. Suppose you have /mylibs/ with many jars other than the default /lib.
    What should I have to do to make weblogic load all the claasses in the jars under /mylibs ?
    Thanks.

    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html

Maybe you are looking for

  • Prs-t1 is not properly rendering indic unicode fonts. Works fine in prs-t2

    Hi prs-t1 is not properly rendering indic unicode fonts (Hindi, Telugu etc).  Same epub works fine in prs-t2 and it renders the fonts properly. Solved! Go to Solution.

  • Forms save message problem!

    Um working in forms 9i. I have set SeprateFrame = True in the configuration file, so that the forms applet opens up in a new window. Now there are two BROWSER windows...one, in which user types the URL of the Forms server and Second, in which the for

  • Changes within iTunes to a track's name are not sticking

    I've been making changes to the name field for a lot of my tracks. Specifically, I wanted to make a simple change from using parentheses to using brackets (e.g, from "Release Me (Cahill Mix)" to "Release Me [Cahill Mix]"). When I initially click OK t

  • Ipod touch screen shadows?

    hi, last december, i had my ipod sitting on a table and i went to take it and the picked it up, and saw this small round circular shadow on the inside of the screen, (the ipod was in the sun does that make a difference?) i took it into the shade and

  • Can I password protect my email accounts on my iPhone?

    I would like to know if there is a way to password protect my email accounts so if someone is using my phone for games etc they cant look at my emails?