Specifying  multiple classpath entries in manifest file

HI all,
I want to make one jar file executable so i have created the jar file with specifying manifest file including main-class & class-path.
But my class-path is little over 75 bytes .There is restriction of entries should be only 70 lines.so jar file is not taking the last 6 bytes.
I have specified multiple classpath entries but it is taking only last entiy only..
How can i set the multiple class path entries in the manifest file?
Thanks in Advance

Classpath entries for a mainfest file should be other jar file names.
Put them in the same or a sub directory as your main jar.
See: http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html

Similar Messages

  • Classpath entry in MANIFEST.MF file

    Hi All,
    When I deploy my application I get an error saying classpath entry in the MANIFEST.MF file is not correct. 
    The .ear file I am using has lot of .jar files, it is complaining about 1 or 2 jars at at time when I try to deploy the application.  After I correct these 1 or 2 jars it complains about some other jar.
    The error is something like .... .
    Cannot deploy application .... Reason: classpath entry in ..../xxx.jar is specified in
    .... xxx.jar/META-INF/MANIFEST.MF  cannot be resolved.
    The question is someone else deployed .ear file with the same .jar and it was ok.
    Is there an option that I can set to ignore the classpath information in MANIFEST.MF file.
    thanks
    S

    Hi All,
    I am deploying an ear file on Netweaver version 7.1.
    Consider the following EAR file structure:
    The main folder, say EAR contains two folders   "common"  and "folder1"
    "common" contains   someutil.jar and
    " folder1 "   contains abc.jar and  xyz.jar
    Given the above structure, the Manifest file in abc.jar contains Class-path entry
    common/someutil.jar xyz.jar
    When deploying the ear file, I get error saying the Class-path entry common/someutil.jar specified in folder1/abc.jar cannot be resolved.
    I changed the class-path to be ../common/someutil.jar and I get the error saying Class-path entry ../common/someutil.jar specified in folder1/abc.jar cannot be resolved
    The class-path entry for xyz.jar is resolved without any issues.
    Kindly let me know the mistake I am making or what the real issue is.
    Edited by: Dana Testa on Jan 21, 2008 9:02 PM

  • Classpath inside a JAR file...

    Hi there,
    I have recently learned that I cannot use my JDBC driver JAR file from within another JAR file. So now I have two JAR files........my application and associated files in one and the JDBC driver in the other.
    This gives me......
    gatekeeper.jar
    ojdbc14.jar
    My problem is, when running the application I get an exception stating that it cannot load the Oracle driver. I'm assuming that this is because it cannot find the JDBC JAR file from within the manifest Class-Path.
    My manifest is this: -
    Main-Class: GateKeeper
    Class-Path: ojdbc14.jar commonfiles images
    This includes my commonfiles package (all classes) and my images directory. All these things are included. I'm trying to run the gatekeeper JAR file from the same directory as the JDBC driver JAR file.
    I've tried: -
    Class-Path: ojdbc14.jar commonfiles images
    Class-Path: .\ojdbc14.jar commonfiles images
    Class-Path: ..\ojdbc14.jar commonfiles images
    None of these things help. Obviously I could just specify the JDBC JAR file when running the application using: -
    java -cp ojdbc14.jar -jar gatekeeper.jar
    ....but I want to have the user just run it without having to know about the classpath.....i.e.
    java -jar gatekeeper.jar
    DrClap said (and I quote) "In the same directory as your main JAR file is easiest, but at any rate the Class-Path entry in your manifest should include the relative path of the driver jar."
    ...Isn't the relative path to the JAR file outside the JAR this?
    .\ojdbc14.jar
    Basically, to recap....from within my JAR application file I want to add to the classpath in the manifest file the JAR file that is outside the application JAR file in the same directory. Helpy?
    ...I'd offer dukes to you fine folks, but I've only got two left. Since I'm such a newbie, I'm not likely to get any more inthe near future, so I'm saving them for a raining day. :) I hope I can get a little charity without resorting to duke bribary. :)

    Hmmm...still not joy. This is the exception I'm getting with the stacktrace.
    C:\Java\deployment\GateKeeper\JarFile>C:\j2sdk1.4.2_03\bin\java -jar gatekeeper.jar
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at commonfiles.OracleDataConnection.<init>(OracleDataConnection.java:26)
    at GateKeeperFrame$MainAction.actionPerformed(GateKeeperFrame.java:429)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    My gatekeeper.jar file contains the following files: -
    C:\Java\deployment\GateKeeper\JarFile>jar -tvf gatekeeper.jar
    0 Wed May 19 19:06:42 BST 2004 META-INF/
    95 Wed May 19 19:06:42 BST 2004 META-INF/MANIFEST.MF
    0 Wed May 19 19:06:38 BST 2004 commonfiles/
    1185 Mon Apr 26 22:24:30 BST 2004 commonfiles/ErrorDialog.class
    1319 Fri Apr 16 10:50:28 BST 2004 commonfiles/ErrorItem.class
    1381 Tue Apr 27 19:53:32 BST 2004 commonfiles/ErrorList.class
    4207 Mon May 17 12:58:40 BST 2004 commonfiles/FileIO.class
    1371 Fri May 14 12:00:38 BST 2004 commonfiles/Input.class
    1655 Fri Apr 23 15:13:58 BST 2004 commonfiles/OracleConnectionDetails.class
    6653 Fri May 14 14:34:58 BST 2004 commonfiles/OracleDataConnection.class
    8612 Fri May 14 15:06:02 BST 2004 commonfiles/Utility.class
    0 Mon May 17 19:56:40 BST 2004 images/
    116 Wed Apr 21 10:19:50 BST 2004 images/Connect.gif
    119 Wed Apr 21 10:19:28 BST 2004 images/Disconnect.gif
    117 Wed Apr 21 10:16:24 BST 2004 images/Exit.gif
    1024 Mon May 10 14:38:28 BST 2004 GateKeeper.class
    186 Wed May 12 11:08:44 BST 2004 GateKeeperFrame$1.class
    5300 Mon May 17 14:38:28 BST 2004 GateKeeperFrame$MainAction.class
    1740 Fri May 14 15:21:20 BST 2004 GateKeeperFrame$MainButtonListener.class
    11034 Mon May 17 11:07:30 BST 2004 GateKeeperFrame.class
    898 Wed Apr 28 22:10:56 BST 2004 LoginFrame$DataSource.class
    6938 Wed Apr 28 22:10:56 BST 2004 LoginFrame.class
    3261 Fri May 14 12:22:28 BST 2004 UsersDataModel.class
    My manifest file for gatekeeper.jar file contains this: -
    Main-Class: GateKeeper
    Class-Path: ojdbc14.jar
    And the directory where I'm running the gatekeeper.jar file contains this: -
    gatekeeper.jar
    ojdbc14.jar
    which I'm running using: -
    java -jar gatekeeper.jar
    Thanks for your help guys. And no, I don't have a newline at the end of the Class-Path entry in the manifest.

  • IconService and classpath in executable jar file

    I use JDIC project (https://jdic.dev.java.net/) and want to use its incubator project iconService as well - both of them in one project. When I run my program from within Eclipse 3.1 IDE, everything works.
    But if I export it to a jar file, the program does not run. I found out that Eclipse 3.1does not create the manifest file correclty. When using only JDIC, I wrote this line to the Manifest file and the exported jar worked:
    Class-Path: external_libs/jdic-0.9-bin-cross-platform/jdic.jarBut when I try to add also the other library - Iconservice to the classpath of the Manifest file like this:
    Class-Path: external_libs/jdic-0.9-bin-cross-platform/jdic.jar external_libs/Icon_service/jdic_icon.jar the console writes out these errors:
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at Frontend.Mainframe.getIcon
    Caused by: org.jdesktop.jdic.spi.ProviderException: Provider org.jdesktop.jdic.icons.impl.WinIconProvider  can not be found
    at ...
    I suppose that the program cannot find the needed "jdic_icon.dll" but I do not know how to set the path to a dll into classpath of manifest file.
    Can anyone help me?
    Thanx in advance.
    Lubos.

    [This is a cross-post of http://forum.java.sun.com/thread.jsp?forum=424&thread=453226]

  • How to add multiple classpath in manifest file

    how can I put multiple class path in manifest file

    Double-post: [url http://forum.java.sun.com/thread.jspa?threadID=792634]http://forum.java.sun.com/thread.jspa?threadID=792634.
    Answered in the other thread.

  • How Can i specify multiple server names in rwservlet.properties  file?

    How Can i specify multiple server names in rwservlet.properties file without clustering?
    I am using oracle 10g Application server. we have 3 servers Repsvr1, RepSvr2 and RepSvr3. Now i need to configure rwservlet.properties file to point to these servers based on any running report. i got 3 keymap files with reports info.
    Sample entry in the key map file is:
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    rwservlet.properties file letting me to enter only one servername. Even though i merged all 3 keymap files into 1, still i have the server name issue. If i leave the server to the default name still i am getting the below error.
    REP-51002: Bind to Reports Server Repsvr1 failed. However, i know the default rep_<servername> would be used incase we dont have SERVER=<value> parameter in the rwservlet.properties file.
    If i specify the servername in the rwservlet.properties file then only Repsvr1 reports are working fine and other 2 server reports are giving the same error like
    REP-51002: Bind to Reports Server <<Server Name>> failed.
    how can i configure the info which will work all 3 reports. 2 Port servers are invoking using oracle forms and report server is invoking using ASP pages.
    If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error, whenever i am trying to integrate all 3 to workable i am getting binding error. if i exclude the server from rwservlet.properties still i am getting the same error.

    My RELOAD_KEYMAP setting is YES only.As i said If i specify Server name & Key map file in rwservlet.properties one at a time, all the reports are working without any error.
    keymap file entries
    key1: server=Repsvr1 userid=xxx/yyy@dbname report=D:\Web\path1\path2\reports\Report1.rdf destype=cache desformat=PDF %*
    key2: server=Repsvr2 userid=xxx/yyy@dbname report=D:\Web\path1\path3\reports\Report2.rdf destype=cache desformat=PDF %*
    If i use http://server.domain:port/reports/rwservlet? cmdkey = key1 should bring the report from Repsvr1 and http://server.domain:port/reports/rwservlet? cmdkey = key2 should bring the report from Repsvr2, but i am getting an error from Repsvr2 saying that REP-51002: Bind to Reports Server repsvr2 failed.
    Only Servername Repsvr1 is in rwservlet.properties file. Now what is the best option to by pass the server from rwservlet.properties file and should be from keymap file. if i comment server name in rwservlet.properties file still i am getting REP-51002: Bind to Reports Server <<Server Name>> failed error for both keys.

  • How to use the classpath defined in a manifest file when debugging

    Using Jdeveloper 10.1.3.3.0 (or any version)
    I'd like to be able to debug using an executable jar which specifies my classpath and main class, without having to manually add all the jars to my debug configuration. Is there a way the debugger can extract that information from the manifest?
    The set of jar files included in my classpath varies depending on which client configuration the client wants to run and we could potentially have a hundred different configurations so there isn't an easy way to manage static libraries. Currently I have to open the jar, extract the manifest and manually add the jars so I can debug. Which is really painful when the configuration can change each time I run. The manifest and jar file are created at runtime based on what client configuration the user is trying to run and there can be multiple versions of a jar file in the directory with mangled names - so I can't just include all the jars.
    Any ideas?

    Run the program from command line, this way you will see the errors, if any.
    example.: java -jar theJarfile.jar
    I was successful in creating a comm application. I placed the win32com.dll in the same directory of my application jar file and all worked.
    I also extracted the comm.jar , and jar'd my app with the extracted comm files to make one jar.
    I also had a fileWriter() to get the clients jre path and my app would write the javax.properties file to the correct place.
    It took me severel weeks and late nights to accomplish this, but it was all necessary to be able to install only my app, and not a bunch of api's that were needed.

  • Classpath in manifest file

    what is 'classpath' in manifest file used for?
    I tried to create classpath, but doesnt have any significant different....
    thanks
    YAn

    This is what the tutorial says about class-path in a manifest file:
    Download extensions are JAR files that are referenced by the manifest files of other JAR files. See the trail on the extension mechanism for information about extensions.
         In a typical situation, an applet will be bundled in a JAR file whose manifest references a JAR file (or several JAR files) that will serve as an extension for the purposes of that applet. Extensions
         may reference each other in the same way.
         Download extensions are specified in the Class-Path header field in the manifest file of an applet, application, or another extension. A Class-Path header might look like this, for example:
              Class-Path: servlet.jar infobus.jar acme/beans.jar
         With this header, the classes in the files servlet.jar, infobus.jar, and acme/beans.jar will serve as extensions for purposes of the applet or application. The URLs in the Class-Path
         header are given relative to the URL of the JAR file of the applet or application. For more details, see the link shown below:
    http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html
    V.V.

  • JApplet MANIFEST classpath.. 3 files

    how do I make the right manifest file for it?
    with this as my MANIFEST.MF
    Manifest-Version: 1.0
    Class-Path: "swingx-0.9.0.jar;mysql-connector-java-5.0.4.jar;MS-SQL_jdbc.jar;"I get this..
    java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXTaskPane
         at Item.<init>(Item.java:35)
         at Main.<clinit>(Main.java:105)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:780)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2074)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:709)
         at sun.applet.AppletPanel.run(AppletPanel.java:363)
         at java.lang.Thread.run(Thread.java:619)which just means that it isn't loading anything I think =(
    how do I make the correct classpath?
    **EDIT**
    just ignore this.. I've figured it out
    Manifest-Version: 1.0
    Class-Path: swingx-0.9.0.jar
    mysql-connector-java-5.0.4.jar
    MS-SQL_jdbc.jarEdited by: Nizzle on Nov 14, 2007 4:46 PM

    Hi Steve,
    As a quick workaround, can you consider merging that 3rd party
    references into a simple, let's call it 3rdparty.jar, file. Then you
    will be able to overcome this line limit. If you use ANT, it can be
    made a part of the build process and can simplify future additions.
    Hope this helps,
    Regards,
    Slava Imeshev
    "Steve Ebersole" <[email protected]> wrote in message
    news:3e788ce9$[email protected]..
    >
    I am having trouble deploying an EAR file having an ejb module with amanifest
    Class-Path entry. It appears to be directly related to the length of thatClass-Path
    entry. No matter the length of the Class-Path entry, ejbc runs fine butthen
    the problem comes trying to upload the EAR through the console.
    First iteration was just skeletal code and the dependencies were minimal.I was
    able to get this uploaded and deployed correctly. For that EAR, the EJBjar file
    manifest's Class-Path entry had only 2 entries and was no where near the72-character
    line limit.
    Second iteration had some functionality and the dependencies were muchlarger.
    Again ejbc ran fine, but I got errors on upload when the console tries todeploy
    the EAR. The manifest Class-Path entry for that ejb version contained 16jar
    files which, because fo the 72 line limit, spread across 3 lines.
    The complaint I get on deployment is NoClassDefFound for a class that isin a
    jar file listed in the manifest classpath (it found it the first time).
    Is there a bug in WebLogic (6.1 sp3) where it cannot recognize manifestclasspath
    entries over a certain limit? I have seen postings about WebLogic'sissues with
    class loading from manifest classpath entries but thought they had allbeen fixed
    as of 6.1sp3.
    Thanks in advance for any help or suggestions.

  • Help using manifest file classpath.

    I have a jar file (A) that is dependant on another jar file (B). When I run my app, which references jar A, if it doesn't also include jar B in its class path I get an error referencing jar B (as expected)
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    But if I add the following to jar A's manifest file:
    Class-Path: E:\commons-io-1.1.jar
    if get an error referencing jar A
    java.lang.NoClassDefFoundError: utilities/gui/ExitApplicationProducer

    Ok, now I have "Class-Path: .\commons-io-1.1.jar"...That's still Windows-specific. If you want it to be relative to the referring jar, then simply specify commons-io-1.1.jar without the windows-specific path notation prefixing it.

  • How to use manifest file to indicate the entry class?

    I am trying to package all my class files together and let the users to run my file using the following command line:
    java -jar program.jar
    For this purpose, I need to specify the main class in the manifest file. I create the manifest file as below:
    Manifest-Version: 1.0
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    Main-Class: classname
    and include it in the same directory as my class file. then I jar all the files using:
    jar cvmf manifest.mf program.jar *.*
    However ,when I try to run the program using:
    java -jar program.jar, I get the error message:
    Failed to load Main-Class manifest attribute from program.jar.
    What have I done wrong? pls help!!! thanks a lot

    Hi.
    here one example:
    Manifest-Version: 1.0
    Main-Class: Solitaire.RunMe
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    you may run it by : java -jar Solitaire.jar, or doubleclick over the Solitaire.jar
    the main class is RunMe in package Solitaire.
    so the complite path would be Solitaire.RunMe.
    enother one
    Manifest-Version: 1.0
    Main-Class: RunMe.RunMe
    Created-By: Forte for Java v. 1.0
    you may run it by : java -jar Transmission.jar, or doubleclick over the Transmission.jar
    the main class is RunMe in package RunMe.
    so the complite path would be RunMe.RunMe.

  • File sender ch. - specifying multiple source with *

    Hi folks,
    In my File2Idoc scenario I need to pick up files from an ftp server where I have about 20 partners which folders look the same.
    like
    root/p1/subd1/import
            p1/subd2/import
            p2/subd1/import
            p2/subd2/import
    In my file sender channel I wanted to specify /root///import but it didnt work.
    1. Is there a way to specify directories like above?
        Or do I have to enumerate all the directories (near 100) in the Advanced selection for source file in the adapter?
    2. I have to move the processed files to import/archive in each partners folder.
        If I specify multiple sources in the adapter, how can I reference them in the Archive directory field on Processing tab?
    thanks

    Hi ,
    While you are using the FTP File Adapter then in the sender Communication channel
    Go to source Directory : then mentioned the /direcotry/filename then under mentioned the File name.
    After that Go to Process Mode tab in the Sender CC Select the Process Mode like "Archive " then you mentioned the Archive directory Path like for ex: /dirname/interfaces/devision/inboundoroutbound/archive then choose the file Type Binary
    May be it helpful to you !
    Regards,
    Ravi.

  • /em/console/notif/addMetrics, How I specify multiple file systems?

    People,
    In EM 10gR2,
    How do configure
    Filesystem Space Available (%)
    metric which I find here:
    /em/console/notif/addMetrics
    It seems obvious if I have just 1 file system to monitor.
    I just type in /u01 for example.
    How do I specify multiple file systems?
    Do I separate each file system name by a comma:
    /u01, /u02, /u03
    ...Peter
    http://GoodJobFastCar.com

    You can use like /u0*

  • Specifying servlet classpath in xml file

              Hi there...
              Am trying to achieve dynamic class reloading for my web application, and have
              specified the servlet classpath in my web.xml file. However my server still loads
              classes that exist on the classpath first, and ignores any 'later' versions I
              have placed in the servlet classpath.
              My question would be do I really have to split up my jar files and place the individual
              classes on the servlet classpath, or can I specify two or more parameters under
              the "context-params" in the web.xml.
              Ideally I would like to be able to keep my jars whole, and upload classes to override
              the contents of the jar, and at the moment I can't see a way to achieve this !!
              Many thanks for any help anyone might be able to give !!
              George
              

    I'm no expert with WAR files and 5.1 but....
              Have you tried putting your jar files and any non-weblogic specific jars in
              to your WEB-INF/lib directory?
              Then you dont have to specify them in the classpath when starting weblogic.
              Following this - i think you should be a step closer to dynamic class
              reloading.
              "George Cover" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Thanks for the prompt response...unfortunately we are still at version 5,
              with
              > a service pack level of 10 (which has just gone live). However we do have
              our
              > environments set up as much as possible in a J2EE fashion.
              >
              > We still specify a classpath, where the jars are kept, however we also
              have WEB-INF
              > directories, where compiled classes (jsp, and shock horror, jhtml) are
              kept !!
              >
              > I think that placing classes in here, puts me in a similar situation as
              placing
              > them on the servlet classpath, the jars still override them !!
              >
              > Also the halfway house our server environments are in, plus the fact they
              are
              > all constantly changing, makes it difficult to predict behaviour, or even
              come
              > close to understanding what might happen if I change configurations here
              and there
              > !!
              >
              > Many thanks
              > George
              >
              > "Matt Krevs" <[email protected]> wrote:
              > >What version of weblogic are you using?
              > >
              > >If you are using 6.0 or greater - my understanding is that you dont
              specify
              > >your classes in the classpath when starting weblogic. Your classes and
              > >jars
              > >should be in web-inf/classes and web-inf/lib and should be loaded from
              > >there.
              > >
              > >"George Cover" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Hi there...
              > >>
              > >> Am trying to achieve dynamic class reloading for my web application,
              > >and
              > >have
              > >> specified the servlet classpath in my web.xml file. However my server
              > >still loads
              > >> classes that exist on the classpath first, and ignores any 'later'
              > >versions I
              > >> have placed in the servlet classpath.
              > >>
              > >> My question would be do I really have to split up my jar files and
              > >place
              > >the individual
              > >> classes on the servlet classpath, or can I specify two or more
              parameters
              > >under
              > >> the "context-params" in the web.xml.
              > >>
              > >> Ideally I would like to be able to keep my jars whole, and upload
              classes
              > >to override
              > >> the contents of the jar, and at the moment I can't see a way to achieve
              > >this !!
              > >>
              > >> Many thanks for any help anyone might be able to give !!
              > >> George
              > >
              > >
              >
              

  • Target to execute multiple junit tests from jar file

    I have written a custom selenium framework using JUnit and Selenium, problem I am having right now is our team wants to run the tests inside HP Quality Center (I have no idea or any experience with Quality Center) but if I provide a jar file the them they can execute it inside the Quality Center (Reason to run it in Quality Center is for reporting purpose).
    Problem is that I have created my framework in away that You can create multiple JUnit base test files for different tests also keep in mind that these classes dont need main method (This is where the problem when it comes to jaring up ). I have introduced following ant target to run all the test cases.
         <target name="test.selenium" depends="jar" description="target to execute all the selenium tests.">
              <junit printsummary="yes">
                   <classpath>
                        <path refid="classpath"/>
                        <path refid="application"/>
                   </classpath>
                   <batchtest fork="yes">
                        <fileset dir="${src.dir}" includes="**/Test*Selenium.java"/>
                   </batchtest>
              </junit>
         </target>above ant target runs without any problem, but when you jar it up you need a manifest and main class, is there away I cant introduce some attribute that can execute all my tests without adding main method to each of them.
    Here is my ant target for jar
         <target name="jar" depends="compile"
                   description="Generates final jar">
              <copy todir="${build.jar}">
                   <fileset dir="lib" excludes="**/*.java"/>
              </copy>
              <jar jarfile="${build.jar}/yukonSelenium.jar"
                        basedir="${build.classes}">
                   <manifest>
                        <attribute name="Main-Class" value="com.somepackage.selenium.test.TestAuthenticationSelenium"/>
                        <attribute name="Class-Path"
                             value=". /c:/build/jar/log4j-1.2.15.jar /c:/build/jar/junit-4.6.jar /c:/build/jar/selenium-java-client-driver.jar /c:/build/jar/dom4j-1.6.1.jar"/>
                   </manifest>
              </jar>
         </target>And this is how the Test Class looks like, I have added main method in this but once i do this after jaring java -jar myJarfile.jar will only execute just the class i have main method init.
    public class TestAuthenticationSelenium extends SomePrivateFrameWorkClass {
         private void init() {
              start();
         @Test
         public void testProductNav() {
                //somecode
         @Test
         public void multipleLogin() throws FileNotFoundException, InterruptedException {
                             //Some Code
         public static void main(String[] args) {
              org.junit.runner.JUnitCore.main("com.somepackage.selenium.test.TestAuthenticationSelenium");
    }Please let me know if i should put the entire ant build file.
    Thanks for any help.
    anuradha.uduwage
    Edited by: Tilter on Aug 24, 2009 10:05 PM
    Edited by: Tilter on Aug 24, 2009 10:06 PM

    What i mean is if i have 3 class files in my jar file, and each one of those classes has a main method, how will i be able to execute a class of my choice from that jar file. In manifest files, you specify the main class, but how would i specify multiple classes with main methods, or achieve my objective here.

Maybe you are looking for

  • Queries related to APP run and Configuration

    Hi All, i would like to know few in APP run.. Can we make partial payments through APP? if yes how can it be configured? on what basis the APP proposal picks open items from vendor items? some times system showing the items in Exceptions list, there

  • Using XML clob in loop

    Hi, I need to extract data from a given piece of XML. If I pass the xml to the procedure as clob and query it in a loop, it returns no rows. However if I include the actuall xml in the loop query it returns the data I'm looking for. Why doesn't it re

  • How to reenable an e-mail sub-accoun​t?

    Respects all;  I have an e-mail sub-account that when I try to send to it returns a message it is "temporarily disabled" I deleted the sub-account that had been phished, then found out I needed to get it back.  When I attempted to activate the same n

  • Backups missing

    Hi first post I have a white macbook 2008 model, running leopard. ive been making backups via time machine for a while now, backing up all my old photos and the such. my brother recently got a macbook pro 2010 model, running snow leopard. i let him u

  • Per user bandwidth rate limit.

                       How to configure per user bandwidth rate limit for wireless guest client, authentication server is ISE 1.2 & wireless controller is 5760.