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

Similar Messages

  • Setting path and class path help

    I am a complete beginner who is currently starting a cd based tutorial!I have downloaded jdk1.1.6 which is the nearest developement kit to the one used in the tutorial.I use windows 98.When I try to set my path or class path as instructed in the docs, I cannot find any thing in the autoexec file at all.I have opened using notepad/Run and DOS edit but all three open an empty file.Where will I need to set up the path and class paths.My system must run these from somewhere else perhaps due to an update.

    Hi,
    Put the following statements in your autoexec.bat.
    <homepath> = Path of your JDK folder on the drive. e.g. c:\jdk
    SET CLASSPATH=;.;<homepath>\lib\tools.jar; .... continue with other jar files on the same line and seperate the entries by a semicolon.
    SET PATH=C:\WINDOWS\;C:\<homepath>\BIN\;
    This autoexec.bat must be on c:\. i.e. U can open it in notepad by giving c:\autoexec.bat in the File Open Dialog. It is possible for this file to be empty. Simply add the commands on the last line.
    Regards ,
    Karan

  • Jar files and class path

    I have a small swing application which connects to an external database and queries something and creates a small report on the local machine. Running from the command line calling the == java MyClass works good. I would like to deploy this to two other machines. I dont want the use to run from the command line solution. I want to run it from a batch file using the jar file. But I am getting a a classpath issue ( ClassNotFoundException for the jdbc drivers ) . I signed my jar file using jarsigner too. I am not interesed in using the Web Start because there are no other security attached to this app. Only couple of people intends to use it. Running from the command line calling the app file explicitly works. In the batch file I added the setclass path too. Still it gives an exception. I added the jdbc driver jar file to the appication jar file too. Still the problem exists.
    Any ideas ?

    instead of including the JDBC driver inside your application's jar, have the two jars sit in a directory separatly and include both of them on your classpath. Or, you can even specify a manifest.mf Class-Path parameter for your application's jar file so that it automatically includes the driver's jar.

  • Package and class path

    for two yrs i am trying to get package right but no result
    i am using window 98
    i have my jdk in d:\jdk1.2\bin; and this works fine if i do not try to use package;somtimes it works well half way with package!
    suppose i want to create a package called rubberband and put classes in it
    i created a folder called rubberband in d:\ and then
    package rubberband;
    import java.awt.*;
    public class RubberbandTest extends Frame{}
    class RubberbandTestPanel {}
    class Colorchoice{}
    this is one unit
    and there are other classes
    package rubberband;
    import java.awt.*;
    abstract class Rubberband {}
    package rubberband;
    import java.awt.*;
    class RubberbandPanel extends Rubberband {}
    and so on
    i opened executive.bat and added to class path as follows:
    path:d:\rubberband\bin;before the already existing d:\jdk1.2\bin;
    then when i come to compile and run the program i have problems
    like:class so and so not found
    please help please step by step tell me what to do

    Another sample might answer your "different location" question.
    Suppose program YourProg in package yourPkg located in directory C:\javaprogs needs to access a class file ExtraClass in package extraPkg in directory C:\differentDir.
    1) Of course the source file must exist in file
    C:\javaprogs\yourPkg\YourProg.java
    and
    C:\differentDir\extraPkg\ExtraClass.class must exist.
    2) Inside the YourProg source, you must import ExtraClass:
    import extraPkg.ExtraClass;
    3) To compile YourProg, you must include location of extraPkg.ExtraClass in the classpath (or the compiler will complain about the inport line above):
    (a -- from C:\javaprogs directory): javac -classpath C:\differentDir yourPkg\YourProg.java
    (b -- from any directory): javac -classpath C:\javaprogs;C:\differentDir yourPkg\YourProg.java
    4) To run YourProg (assuming it contains a main method), you must include all locations in classpath:
    (a -- from C:\javaprogs directory): java -classpath .;C:\differentDir yourPkg.YourProg
    (b -- from any directory): java -classpath C:\javaprogs;C:\differentDir yourPkg.YourProg
    If you get a NoClassDefFoundError, that means that the java was run without the proper location included in the classpath passed to the -classpath argument. The -classpath argument should be ';'-separated and contain no spaces (so if a long directory name contains space you should enclose in double quotes, as this example:
    java -cp "C:\Program Files\somedir;C:\anotherdir" NameOfAClass

  • Set the path and class path in windows xp professional

    hi guys....could any one tell me step by step on how to set the path and classpath on windows xp professioanl? This is my path and classpath
    set path = %path%;C:\jdk1.3.1_02\bin;c:\JOpen672.jar;c:\
    set CLASSPATH = c:\j2sdkee1.3.1\lib\j2ee.jar;c:\JOpen672.Jar;c:\;c:\postgresql.jar;c:\jai_core.jar
    not working please help me on this thanks alot.
    novicepro

    Below is a Helloworld program, copy and paste it into your editor and save it as "HelloWorld.java" Use capitalization, Java is case-sensitive. If you're using Notepad, quote the name when saving, otherwise Notepad adds ".txt" to the name. Go to DOS and check that you've got the file where you want it and that it's named correctly.
    ----------program HelloWorld.java--------------
    public class HelloWorld {
    public static void main (String[] args) {
    System.out.println("Hello World!");
    In the same directory as HelloWorld.java, enter "javac" - the program should print out a list of options, if not, set your PATH - see below.
    In the same directory as HelloWorld.java, enter "javac HelloWorld.java" and the javac compiler will create HelloWorld.class. If it was successful it will not give any messages. Check that the file is created.
    In the same directory as HelloWorld.java, enter "java -cp . HelloWorld" with the spaces and the period. The program will run.
    Here is additional information:
    The Path is a set of pointers that Windows uses to locate programs that you execute, like javac.exe and java.exe. This setting is explained here:
    http://java.sun.com/j2se/1.4/install-windows.html
    Scroll down to: 5. Update the PATH variable
    (you should have already done this as part of the s/w installation)
    The CLASSPATH is another set of pointers that is used by Java to find the files that you create and want compiled and/or run. This setting is explained here:
    Setting the Classpath:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.0_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_1\lib\tools.jar;C:\NetRexx\NrxRedBk

  • Java class libraries and class paths

    I'm using NetBeans IDE 6
    I'm trying to make a class library (which is started from another application).
    This is supposed to connect to a SQL 2005 database by first registering the SQLServerDriver from the sqljdbc.jar library.
    I've tried it in an Application with a main class and it runs fine. But when I move the built classes to the folder I want them to run from, I get a ClassNotFound exception for the ServerDriver when run.
    I'm assuming it is a problem with the classpath after I make the move, is there anything special I need to do to keep the classpath intact so it can find the driver?
    Sorry if it's too vague, I can try to clarify things if needed.

    See this NetBeans tutorial:
    http://www.netbeans.org/kb/articles/javase-deploy.html
    These forums provide support for Java programming, not NetBeans (or any other IDE.)
    This question should have been posted to the NB site mailing list.

  • Weblogic and class path

    Hai,
    how to set a classpath from the command line.
    Ram

    ON NT:
    set CLASSPATH=%CLASSPATH%;c:\myclasses;d:\yourclasses
    ON UNIX
    CLASSPATH=$CLASSPATH:/opt/myclasses:/apps/yourclasses
    export CLASSPATH
    where %CLASSPATH% is the classpath value in env before we set it.
    (essentially we are appending classpath here)
    check out the startup/setenv scripts that comes with weblogic.
    "ram prabhala" <[email protected]> wrote:
    >
    Hai,
    how to set a classpath from the command line.
    Ram

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

  • Multiple Class-Path: attributes in Jar files

    Hello,
    I'm packaging a set of jar files for distribution with Class-Path: attributes in them. In the documentation I read and in one of the java trails it said that I could have a manifest file like:
    Class-Path: log4j.jar log4j-core.jar
    Class-Path: jsse.jar jcert.jar jnet.jar
    But this doesn't work. It only works when I do this:
    Class-Path: log4j.jar log4j-core.jar jsse.jar jcert.jar jnet.jar
    Here is how I'm running the jar:
    java -jar server.jar
    Is the documentation wrong? Or this is a bug?
    thanks
    charlie

    Certain attributes were only meant to be specified once. Like Main-Class and Class-Path for example. If these were listed two or more times, then the last occurance is the one that gets recognized (basically, each new instance overwrites the previous instance). Some attributes are listed as "per-entry" and are freely duplicated for each entry. For example signed jars could have a number of Name: and xxx-Digest: attributes.
    This link is to the manifest spec:
    http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html
    To answer the original posters question, the doc's are in error. Actually, the error was not in the docs, it was in the tutorial, but none the less its still in error. He could have done this:
    Class-Path: log4j.jar log4j-core.jar
    jsse.jar jcert.jar jnet.jar
    ^-- two spaces before the start of jsse.jar
    because the docs allow for line continuation (although it's not exactly clear if you read the docs). The docs are also apparently in error regarding the max line length of 72 bytes. I have tested this with over 100 char's on a win32 machine and it works fine for me. The limitation must therefore apply to some other operating system, or it could just be in error.
    -Ron

  • WAR meta-inf/manifest Class-Path jars use which classloader ?

    If using an expanded EAR structure, my Web App requires some utility classes. I
    can either put these in my :-
    meta-inf/manifest.mf
    Class-Path : utility.jar
    OR
    web-inf/lib
    can contain the utility.jar
    Is there any difference in terms of which classloader is used to load these classes,
    the EAR/EJB classloader or the Web App child classloader ?
    What is recommended ?

    If have found out the answer myself by testing it :-
    A jar in the meta-inf/manifest.mf e.g. Class-Path : utility.jar
    will be loaded by the EAR/EJB level classloader
    whereas
    web-inf/lib containing utility.jar
    will be loaded by the Web App level child classloader.
    Dimitri Rakitine <[email protected]> wrote:
    I have this question too - it appears that 6.1sp2 attempts to use Class-Path
    in jars in WEB-INF/lib - what this Class-Path: is supposed to do ???
    Pete <[email protected]> wrote:
    If using an expanded EAR structure, my Web App requires some utilityclasses. I
    can either put these in my :-
    meta-inf/manifest.mf
    Class-Path : utility.jar
    OR
    web-inf/lib
    can contain the utility.jar
    Is there any difference in terms of which classloader is used to loadthese classes,
    the EAR/EJB classloader or the Web App child classloader ?
    What is recommended ?--
    Dimitri

  • J2EE Packaging and manifest Class-Path:

    Does anyone know if Weblogic 6.0 supports the redefined deployment extension mechanism
    that makes use of the 'Class-Path:' entry in the manifest files?
    In our project we have one single .ear file containing a couple of EJB's (.jar
    files) and a Web Application (.war file).
    We are using log4j as logging mechanism and we would like to keep everything in
    the .ear file so that we can make hot-deploys. So we are trying not to make use
    of the classpath in startWebLogic.sh. All of our EJB's and the Web Application
    makes use of log4j.jar. My question is; can I do the following and make it work
    in Weblogic 6.0?
    1. In every EJB .jar file I add the follwing to the manifest file - "Class-Path:
    log4j.jar"
    2. I place the log4j.jar in the root directory of the .ear file.
    By doing this I expect that the ear classloader loads the log4j.jar classes. Am
    I right or do I do something wrong. At least it does not seem to work.
    Using Weblogic 6.0 without service pack.
    Thanks,
    Steen

    This does not work in WebLogic 6.0. It's supposed to be supported in 6.1
    Daniel
    -----Original Message-----
    From: Steen Laursen [mailto:[email protected]]
    Posted At: Wednesday, August 08, 2001 1:32 PM
    Posted To: environment
    Conversation: J2EE Packaging and manifest Class-Path:
    Subject: J2EE Packaging and manifest Class-Path:
    Does anyone know if Weblogic 6.0 supports the redefined
    deployment extension mechanism
    that makes use of the 'Class-Path:' entry in the manifest files?
    In our project we have one single .ear file containing a
    couple of EJB's (.jar
    files) and a Web Application (.war file).
    We are using log4j as logging mechanism and we would like to
    keep everything in
    the .ear file so that we can make hot-deploys. So we are
    trying not to make use
    of the classpath in startWebLogic.sh. All of our EJB's and
    the Web Application
    makes use of log4j.jar. My question is; can I do the
    following and make it work
    in Weblogic 6.0?
    1. In every EJB .jar file I add the follwing to the manifest
    file - "Class-Path:
    log4j.jar"
    2. I place the log4j.jar in the root directory of the .ear file.
    By doing this I expect that the ear classloader loads the
    log4j.jar classes. Am
    I right or do I do something wrong. At least it does not seem
    to work.
    Using Weblogic 6.0 without service pack.
    Thanks,
    Steen

  • Jar: Manifest-Attribute "Class-Path"

    I've got a problem with the Class-Path-attribute of the JARs manifest-file. So I've written a real simple application to test where the problems occure... but even this trivial app does not work!
    The execution starts at "Starter.java":
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    }The class "Caller" is in a JAR ("Caller.jar") in the same directory as Starter.java.
    Caller.java:
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    }The class "Writer" is in a JAR ("Writer.jar") in the same directory as Starter.java and Caller.jar.
    Writer.java:
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }The file Caller.jar consists of Caller.class and the Manifest.mf. The package-structur/the path seams to be all right.
    The file Writer.jar consists of Writer.class and the Manifest.mf. The package-structur/the path seams to be all right.
    If I invoke the Starter with:
    java Starter -classpath Caller.jar;Writer.jareverything's fine.
    Now, I added the following line to the Manifest.mf of Caller.jar:
    Class-Path: Writer.jar(with one empty line between Manifest-Version: 1.0 and the new line.
    So... shouldn't it be possible now, to invoke the application with:
    java Starter -classpath Caller.jar ???
    It doesn't work. So: what have I misunderstood?
    (The error message is:
    Exception in thread "main" java.lang.NoClassDefFoundError: packageTwo/Writer
          at packageOne.Caller.callWriter(packageOne/Caller.java:5)
          at Starter.main(Starter.java:3)

    Hmmm, I tested it and here are the command I ran and their results. Try doing the same on your computer:aleph% mkdir packageOne
    aleph% mkdir packageTwoThat created the directories.aleph% cat > Starter.java
    public class Starter{
          public static void main(String args[]){
                packageOne.Caller.callWriter();
    aleph% cat > packageOne/Caller.java
    package packageOne;
    public class Caller{
          public static void callWriter(){
                packageTwo.Writer.write("Write this");
    aleph% cat > packageTwo/Writer.java
    package packageTwo;
    public class Writer{
          public static void write(String message){
                System.out.println(message);
    }That created the source files: Starter.java in the current directory, Caller.java under packageOne and Writer.java under packageTwo. Next the compiling and creating the manifest file:aleph% javac Starter.java
    aleph% cat > MF
    Class-Path: Writer.jarThat created additional info to be included in manifest file and put it in a file called MF.
    Then I package "caller.jar" with the manifest and "Writer.jar" without it:aleph% jar -cmf MF caller.jar packageOne
    aleph% jar -cf Writer.jar packageTwoDelete the package* directories so java wont get confused...aleph% rm -r package*And finally run the thing. Remember that the path separator is : in unix but ; in DOS, if that is what you are using.aleph% java -cp .:caller.jar Starter
    Write thisNo problems anywhere. What are the steps you did?

  • Runnable JAR, Main-Class, Class-Path and INDEX.LST

    Some funky finding, don't know whether this is a bug or a feature...
    I'm using
    java version "1.4.2_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
    I observed follwing weired behaviour:
    If you have a JAR packed with your classes and define in the Manifest a Main-Class and a Class-path pointing to JARs in the same directory than the main JAR, example:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.4.2_06-b03 (Sun Microsystems Inc.)
    Main-Class: main.Main
    Class-Path: activation.jar axis.jar commons-discovery.jar
      commons-logging.jar jaxrpc.jar log4j-1.2.8.jar mail.jar saaj.jar wsd
    l4j.jar junit.jarTHEN you should NOT have a META-INF/INDEX.LST file. This file is created for instance by ant jar when setting attribute index="true". Itt complies to the JAR standard and is used to find classes faster.
    If you have such a file then none of the classes of the "Class-Path" JARs will be found. At least that was true for me...
    Hope, I haven't bothered you with something commonly knwown. Just wanted to let you know, to avoid fighting againt JARs like I did for the last 3 hours..damn.
    Cheers,
    Peter

    Does anyone know if having a Class-Path in the manifest would ignore the system environment variable CLASSPATH?
    I'm seeing this in my set-up. I have an external jar file that can be seen if copied to <jre dir>/lib/ext, but when it's in another dir with the CLASSPATH pointing to it can't be found.
    My applet uses a number of jar files and I reference them in the manifest using the Class-Path entry. Does this supercede the environment variable??

  • Please remove Class-Path from kodo-jdo-runtime.jar manifest

    This is repost. Class-Path should not be in manifest of
    kodo-jdo-runtime.jar
    It causes problems with security manager when using signed jars under
    webstart. It can potentially cause all kind of other problems due to class
    path conflicts
    Seems to be a problem in manifest. It is due to Class-Path in manifest. I
    deleted manifest from kodo-jdo-runtime and signed it seems to be ok.
    I got more meaningful error now - serp.jar is missing
    I would suggest to remove Class-Path from this jar. I've seen some very
    weired behaviour of systems with Class-Path in different jars. I believe it
    should be only in your application jar
    Class-Path: serp.jar jca1.0.jar jca.jar crimson.jar xerces.jar jaxp.jar
    jdo1_0.jar jdo.jar jdbc2_0-stdext.jar jndi.jar jta-spec1_0_1.jar jta.jar
    I would also remove following:
    Main-Class: com.solarmetric.kodo.enhance.JDOEnhancer
    OpenTools-UI: com.solarmetric.modules.integration.jbuilder.KodoTools
    OpenTools-Build: com.solarmetric.modules.integration.jbuilder.KodoBuilder
    because it does not belong to kodo-jdo.runtime.jar
    "Alex Roytman" <[email protected]> wrote in message
    news:ahi05g$veq$[email protected]..
    I am having troubles running kodo 2.3 application under web start.
    I am getting following error:
    Missing signed entry in resource:
    http://ptilx1/usorg/webstart/lib/kodo-jdo-runtime.jar
    I signed kodo-jdo-runtime.jar as usual
    The same deployment worked fine with Kodo 2.2.5

    Alex-
    In article <ahk7vi$cmf$[email protected]>, Alex Roytman wrote:
    This is repost. Class-Path should not be in manifest of
    kodo-jdo-runtime.jar
    It causes problems with security manager when using signed jars under
    webstart. It can potentially cause all kind of other problems due to class
    path conflictsThanks for the feedback. We will remove the entries. In general, it is nice
    to have it in the Class-Path, since they you only need to
    kodo-jdo-runtime.jar in the CLASSPATH variable, but we were not aware of
    it causing any problems.
    Seems to be a problem in manifest. It is due to Class-Path in manifest. I
    deleted manifest from kodo-jdo-runtime and signed it seems to be ok.
    I got more meaningful error now - serp.jar is missing
    I would suggest to remove Class-Path from this jar. I've seen some very
    weired behaviour of systems with Class-Path in different jars. I believe it
    should be only in your application jar
    Class-Path: serp.jar jca1.0.jar jca.jar crimson.jar xerces.jar jaxp.jar
    jdo1_0.jar jdo.jar jdbc2_0-stdext.jar jndi.jar jta-spec1_0_1.jar jta.jar
    I would also remove following:
    Main-Class: com.solarmetric.kodo.enhance.JDOEnhancer
    OpenTools-UI: com.solarmetric.modules.integration.jbuilder.KodoTools
    OpenTools-Build: com.solarmetric.modules.integration.jbuilder.KodoBuilder
    because it does not belong to kodo-jdo.runtime.jarCorrect again: we will remove it in the upcoming release.
    "Alex Roytman" <[email protected]> wrote in message
    news:ahi05g$veq$[email protected]..
    I am having troubles running kodo 2.3 application under web start.
    I am getting following error:
    Missing signed entry in resource:
    http://ptilx1/usorg/webstart/lib/kodo-jdo-runtime.jar
    I signed kodo-jdo-runtime.jar as usual
    The same deployment worked fine with Kodo 2.2.5
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

  • 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());
    }

Maybe you are looking for

  • WSIF - Can we return java class back to bpel (PLEASE HELP)

    Scenario : We have old project and migrating to Oracle BPEL. In this project we have Java Files and inside that java files we have many functions which return java object. Is it possible to return java value object to bpel process. Steps which i have

  • ATTN: GPO Users

    I'm getting ready (I hope) to upgrade my Garritan Personal Orchestra software to version 2.2.1. If there are any other GPO/Logic users reading this, and you have upgraded, have you noticed any performance glitches, plugin/sample loading errors (besid

  • Why does Safari open with the last page viewed from the previous session rather than my homepage?

    The only way I can get Safari to open to my homepage when starting a new session is to be sure to close all windows from the previous session before quitting Safari.  If I don't go through this process, Safari opens to the last site I accessed before

  • Date validation in searchpage

    hello friends, 1)i have a filed name called transactiondate in seach page. 2)transaction date want to diaply From and To in same line 3)Then based on that condition want to diaplay seacrh results in advabnce table data. Thanks krish.

  • Many, Many Problems after Installing Leopard

    I installed leopard and about half way through i got installiation failed, after inspecting my disc i realized that it was scratched and thought, "I'll just be content with OS X 10.4". My computer took extra long to boot up, and... it went into leopa