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.

Similar Messages

  • Help using jar file!

    Help using jar file!
    Hello
    I have created a jar file by using
    jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
    In 1.java file :I have used
    JEditorPane editor;
    editor.setPage(getClass().getResource("/Mydirectory/default.htm"));
    If I am only giving myjar.jar file to the client without Mydirectory then also it is working fine by showing default.htm in JeditorPane.
    But my problem is I want to use
    Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
    targetstr will be the filename with path of the default.htm
    If I am giving myjar.jar file with Mydirectory to the client it is working but I don't want to give Mydirectory to the client .
    What should I do?
    Is there any solution for this?
    Using another jar file which will include mydirectory can solve this problem?
    Is there any othe concept in java so that I wll be able to hide Mydirectory from client?
    Please help.

    It seems like you could extract the .htm file from the jar, either with Runtime.exec or using the Jar API classes.

  • Need help with Manifest file for jar

    I am creating an executable jar for a document management application. In the manifest file there is a Class-Path setting. I will be running this app in multiple environments and I want this Class-Path setting to read from the machines classpath. How do I do it? Any help is greatly appreciated.

    Before you Jared your classes, did the classes work?
    One possible solution would be to include the classes you're using within the Jar itself. But before you do that, I would re-read the Licence agreement for those classes.

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

  • Need help with manifest file

    When I created a jar file with the -m option to insert a list of Name headers in my manifest file, only the last one in the list shows up in the manifest file when I unjar it. What am I doing wrong?

    i have used
    jar command it takes whatever specified in your own manifest information file into the meta-inf 's manifest file
    use jar -cvfm jarfile.jar maniinfofile.txt files.*
    hope it helps !!

  • Using Manifest File in PowerBuilder 5

    Hi,
    We are working in an old project which was developed in PowerBuilder 5.0,
    We followed the below steps to get the list of DLL and OCX getting register with our Application
    1. Searched in application installation path.
    2. Searched in source code.
    Is there any other way to get the list of components and reference list?
    We need the above list to create manifest file.
    We have another big challenge that whether Manifest file is work with PB5 or not? If yes,how to make PB5 app to communicate with manifest?
    Please help...
    Thanks,
    Sundar

    Roland,
    Please help me to find third party DLL and mention the DLLs to be register.
    I hope that the below dlls are related to PowerBuilder 5.0 and need not to register
    Pbbgr050.dll, Pbdbt050.dll, Pbdwe050.dll, Pbodb050.dll, Pbroi050.dll, Pbrtc050.dll, Pbrte050.dll, Pbrtf050.dll, Pbshr050.dll, Pbtyp050.dll
    I have doubt on following DLLs and ocx
    msvcrt.dll, MSVCRT40.dll, OLEPRO32.dll, Pfccom32.dll, CTDATE32.ocx
    Please confirm above 4 DLLs and 1 OCX are need to register?
    Thanks,
    Sundar

  • How to use manifest file in Adobe Photoshop Filter Plugin

    Hi all,
    I am developing the Photoshop Filter plugin using wxWidgets-2.6.2 on PhotoshopSDK CS2 for windowsXP.I am unable to use XP themes in my plugin.Though I have already added the following line in my Plugin .rc file ----->
    2 RT_MANIFEST "Plugin.manifest"
    I have also added the "ISOLATION_AWARE_ENABLED" in the properties.
    But still I am unable to use XP themes in my Plugin. Please Help!!!
    Regards
    Deepesh Negi

    Thanks, that helps.

  • Help using texture files in CS4

    Hi all,
      I'm trying to do something that seems like it should be fairly simple.  I'm trying to create a plane and apply a color map and a bump map, so the final render basically shows an overhead view of a flat surface showing the color map, with some depth added by the bump map.  I have been creating a new file in RBG format, creating a new 3D postcard from layer (giving me the plane), and applying a color map and a bump map (both jpegs from Dosch Design) using the 3D {Materials} pane.  Whenever I render the final image, it usually appears completely washed out (i.e., it looks like a washed-out version of the bump map).  Can anyone figure out where I am going wrong, or what I need to do differently?  I find that I can see the color map only when I insert it as the Diffuse map (when I insert it as the Normal map, it is not shown).  Any help would be greatly appreciated.  Thanks in advance.

    Thanks.  I've used Photoshop for a while, but I'm new to the 3D stuff.  I was thinking of the RBG information in the texture maps as color information, as opposed to how Photoshop interprets that information from a texture map.  I think that part of the reason the final render appeared "washed out" was that the global ambient color was set to white.  I've spent a bit of time playing with the various settings (and following your suggestions), which definitely helped - I'm thinking that I really need to spend more time working with the program.  Do you know of any good 3D tutorials that you would recommend again?  Thanks again.

  • Help using m2t files with Final Cut! :D

    Hey everyone! I trying to work with a .m2t file of HD footage I've downloaded, I can't seem to open it with Final Cut or Motion, what will I need to do to access this file? Can anyone help!? Thank you

    Use MPEG Streamclip to demux/convert the m2t file(s) into whatever format matches your FCP Sequence settings.
    -DH

  • Help using file sharing with different users accounts on same Macbook

    Hi, I just wanted a little help using the file sharing option. My wife and I had different users accounts on the same MacBook, but when I am trying to share my baby's picture from my documents folder for my wife to have the same picture, I can't find the way to do that; I am not been able to find my pictures on my wife's account. Is there any way that I could share a folder from my account and my wife to have the same files at the same time on her account?
    I mean, something like the smart play list on the itunes?
    Thank you

    You can't do that directly unless you change permissions on your whole Documents folder which is not a good idea. Your wife can see your Documents folder from her account by going to Users/yourusername/Documents. However, this folder has no read privileges for others except yourself by default so she won't be able to open it.
    rather than changing permissions on your Documents folder, you can place the pictures you want to share in Public folder in your home directory or in Users/Shared folder.

  • Jar Files in a Jar File - Classpath Error

    Hi,
    I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able to execute the main file in the application jar file. Then I created another jar file that holds all the dependent jar files the application is dependent on along with the application jar file into one super jar file. configured the main class attribute of the super jar file to that in the application jar file. When I try to execute it, I'm getting an error saying Class Not Found. Can someone guide me in setting the classpath for this super jar file in its manifest file.
    Presently my manifest file classpath variable in the super jar file is set as App.jar Depend1.jar Depend2.jar
    Thanks,
    E H

    Java's standard class loaders do not support jar files inside of other jar files, and will give the error you see.
    You can write your own customized class loader, use a 3rd-party solution (onejar at sourceforge is one), or remove the interior jars.

  • Need help with a manifest file

    I'm trying to make a jar file executable, and I've seen numerous questions and answers regarding this particular issue, and none of them helped me with my problem.
    I have a batch file that runs the application without any problem, but when I try to create a manifest with the main class attribute copied char by char from my batch file and run it, I get a message "could not find the main class".
    I been browsing the web for the past 4 hours* now and the only type of answers I see for that problem is something like this:
    ...Main-Class... "${main.class}".
    This type of solution is worthless to me, since it doesn't tell me why my path is correct when I use the .bat file and incorrect when used in a .jar file.
    Thanks,
    Omer.

    I read there the related topics.
    However, it wasn't even close to being helpful.
    I'm using ant and the inner build.xml syntax is probably eluding me somewhere.
    In fact, if it was possible to find an example build file that was written for ant 1.6 or later and contains the Main-Class attribute (I've seen some examples that contain an example file, but none of them contained the Main-Class attribute, and I found some Main-Class examples but none of them showed where they should go or how they should appear within the manifest file.
    I'm at the point when I'm about to give up the whole idea and provide the unprofessionally looking .bat file.
    I thank anyone who has put his mind to this issue, but if there is no build.xml example, I guess you can't help me.
    Thanks anyway.
    It's frustrating to see how the most flexible language there is to work with when coding, becomes next to impossible to work with when you need to deploy it.
    Update, 30.04.2008:
    I have managed to figure out that the problem wasn't with the main class, but with the classpath.
    I run the program from Intellij, and everything works perfectly. I use a batch file, and perfect. I try to use an Ant generated jar with the classpath attribute set exactly like the batch file's paths, and nothing.
    There is no error message either.
    The classpath is located under "/lib/*.jar" in the distribution directory, where the "program.jar" is located.
    I have come to the point that i would pay to see a proper working build.xml and to see the relative and absolute paths of the classpath.
    This is actually harder than developing an extremely rich server application.
    Edited by: omerk76 on Apr 30, 2008 11:04 AM

  • Manifest file: Help needed

    Hi everyone,
    We have a java app that includes in its install package some JRE components.
    We use to put these JREs under jre a subdirectory of the App main DIR at this point everything works fine and the manifest file looks like:
    Manifest-Version: 1.0
    Main-Class: mycompany.DIR1.MAINCLASSNAME
    Class-Path: .\jre\lib\jh.jar
    Created-By: 1.2.2 (Sun Microsystems Inc.)
    The problem with this approach is when you install more than one copy you will duplicate also the JRE components (some 15 Megs).
    To avoid these duplications we decided to put the JREs in a common directory such as <WINDIR> (WINNT / Windows)
    to do so the manifest file has to be updated to reflect the jh.jar path.
    I tried a hard coded path: Class-Path: e:\WINNT\jre\lib\jh.jar and got this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: mycompany/DIR1/MAINCLASSNAME
    by removing the class-path line I got the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSetException at mycompany.DIR1.MAINCLASSNAME.main(MAINCLASSNAME.java:30)
    Please help,
    any idea or suggestions are appreciated.
    Thanks,
    dobject.

    You could try a CLASSPATH along the lines of e:\WINNT\jre\lib\jh.jar;.
    Note, though, that you're throwing a lot of portability away.

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

  • MANIFEST file question pls help

    Hi,
    i have a JAR file on my ftp server. and i want to only read Manifest file informations in this jar file without downloading file on my pc.
    is it possible to do this ?
    Please help,
    Regards,
    Musa YILMAZ

    thanks,
    yes i use zip classes but it always want to cache file to temp directory in windows, i must wait until caching finishes
    but my jar file is 5mb so i wait so long,
    also caching is as same as downloading file.
    but if not necessary i wont download file.
    but i think it is not possible.
    Regards,
    Musa YILMAZ

Maybe you are looking for

  • Problem with matchcode in alv for specific field

    Hi, I have created a customer specific data element ZE_CONFTYPE, with a customer specific domain, and in this domain I have defined a value range with 3 possible single values (partial, final, automatic). Later, I have defined a field: CTYPE type ZE_

  • (Classic) Report losing pagination on partial page refresh - APEX feature request

    I have a page with both an Interactive Report and some classic Report regions. Based on user updates, there are many occasions where I need to do a partial page refresh. Thanks to plugin http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-p

  • How Come Some Clips Need To Be Rendered

    Hi, I have several projects open, one is from standard def DV tapes and the other is from a FCP learning tutorial. When doing 3 way color correcting the project from the DV tapes needs to be rendered after changes while the tutorial files don't need

  • Days of Music

    I downloaded the latest version of Itunes, 7.3.2.6 I have noticed that where it used to say approx 11. whatever days of music at the bottom, it is now showing 373.2 days and even I know this is impossible on a 30gig Ipod! Whilst it is not imperative

  • Acrobat 8 standard  - Removing pictures from PDF files

    I hope this is an easy one to answer but I'm having troubles removing pictures from a PDF file and I need some help, can anyone answer please?