4 Replies Latest reply: Jul 25, 2011 7:52 PM by EJP RSS

    Class-path Manifest Attribute in Featureset Jar

    Jcgeorge-Oracle
      We have kept the classpath entry in Manifest as ( Windows Platform )
      Manifest-Version: 1.0
      Implementation-Vendor: Oracle
      Implementation-Version: 11.1.1.0.0
      Class-Path: C:/fscmap/fusionapps/applications/fnd/deploy/FndSetupModel
      .jar
      Extension-Name: FndSetupFAModel

      This does not result in classes loaded from this path. As mentioned in Sun doc (http://download.oracle.com/javase/1.3/docs/guide/jar/jar.html#Main Attributes) , it takes a relative path / URL.We tried following formats , none of them works

      a)     file:///c:/fscmap/fusionapps/applications/fnd/deploy/FndSetupModel.jar
      b)     /c: /fscmap/fusionapps/applications/fnd/deploy/FndSetupModel.jar
      c)     c: /fscmap/fusionapps/applications/fnd/deploy/FndSetupModel.jar
      d)     c: \fscmap\fusionapps\applications\fnd\deploy\FndSetupModel.jar

      Any clue on what could be issue here ?.What should be the format in which the classpath entry should be mentioned ?
      Thanks

      Joseph
        • 1. Re: Class-path Manifest Attribute in Featureset Jar
          EJP
          As mentioned in Sun doc (http://download.oracle.com/javase/1.3/docs/guide/jar/jar.html#Main Attributes) , it takes a relative path/URL.
          In other words a URL that is to be interpreted relative to the location of the JAR file.
          We tried following formats , none of them works
          [snip]
          None of those four is a relative URL. They are all absolute URLs.
          • 2. Re: Class-path Manifest Attribute in Featureset Jar
            baftos
            None of your attempts is a relative URL's. A relative URL is a fancy name for a relative path. Relative to what? To your jar's path.
            The rationale is that your jar can be deployed in all kind of places in the different users' file systems and if it has dependent jars, they better always be at a known location relative to your jar's location.
            Examples of relative URL's:
            ./FndSetupModel.jar
            ../FndSetupModel.jar
            ./fscmap/fusionapps/applications/fnd/deploy/FndSetupModel.jar
            • 3. Re: Class-path Manifest Attribute in Featureset Jar
              Jcgeorge-Oracle
              Hi,

              We have a limitation in keeping the relative path in our featureset. The reason for this is that , the featureset jar is loaded from a Temp location instead of its designated location by WLS (Windows Platform only)
              This was due to the bug (sun bug ) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041014 , and as a work-around solution WLS copies the Libraries to a temp location and load the jar from there.
              Is there any way to find out the temp location ? Or any pointer to a fool-proof work-around this situation ?

              Thanks

              Joseph
              • 4. Re: Class-path Manifest Attribute in Featureset Jar
                EJP
                If you need to be able to replace the jar during runtime you must omit it from the classpath altogether. Moving it to a different directory doesn't accomplish anything relevant to the bug apart from disconnecting it from the classpath Manifest entry, and if it didn't do that you would still have the same problem.

                You need to load the stuff in the JAR yourself via a URLClassLoader, and replace the class loader every time the JAR file changes.