Accessing a images and a external library packaged in a jar

I am trying to include a library (abc.jar) in another jar file (def.jar). The classes in def.jar import functionality from the abc.jar file. May I know if it is possible and if it is possible, how do I achieve it?
I need to access images in a jar file (ghi.jar) from classes which are in the same jar file. In addition, I specified the classpath to include an additional library (tgf.jar) located external to ghi.jar itself. This had caused the images to be inaccessible by my java classes. I had used the getResource() method from Class to load the images. Is there any way to solve this problem?
Regards,
Clivant

You cannot access a resource inside a jar which is inside another jar.
If you need to access a resource which is in your class path use
getClass().getClassLoader().getResourceAsInputStream(name);

Similar Messages

  • Accessing Time Capsule and linked external hard drive from other devices and copying to these drives

    Hi
    Please be gentle. I am not that technically able :-)
    I have managed to set up my time capsule. Router working, external hard drive linked, time machine back ups working...
    The last thing I am looking to do is to access files on my time capsule and also external hard drive (linked to it), from Mac, Iphones, Ipads, Apple TV, Windows laptops X2. Am I able to do that? Have read so many discussions but dont get the answer. Please be gentle :-)
    Regards
    Tommy

    The last thing I am looking to do is to access files on my time capsule and also external hard drive (linked to it), from Mac
    This should be automatic.. find the TC disk under shared in finder.. double click it and see under the data folder.. you can create new folders in there.
    Note using the TC for data and TM backups is not the greatest of ideas.. please read pondini.
    Q3 here. http://pondini.org/TM/Time_Capsule.html
    The external drive is fine though.. 
    Now it can have loads of issues if you run Mavericks.. so if you have trouble.. do not be surprised.. if you run Mavericks.. be surprised if it works without trouble.
    Iphones, Ipads
    iOS devices are not file based.. they are not intended to be used with a file device like TC and will neither backup to it nor open files from it.. of course what apple wants and what users want are different things so there are plenty of file apps to help you read and write files.
    Filebrowser is the major one.
    http://www.stratospherix.com/products/filebrowser/
    You still cannot backup though.. iOS uses itunes to backup or icloud.
    Apple TV
    There is nothing you can do with AppleTV.. it is not a file device at all.. it is not even a media player.. it is a streamer. (Early model Gen1 and Gen2 can be jailbreak.. so they do actually have media player ability) Gen3 is tied to its mother's (iTunes) skirts with steel cables.. no JB.. no use really. If you want to play movies from a TC buy a WD Live TV.. it is a player.. !!
    Windows laptops X2
    You can access the TC from windows..
    1. Make sure the TC naming complies with windows networking.. to put that simply.. all names should be short, no spaces and pure alphanumeric. Apple wizard will recommend a name for the TC, like
    Fred Blog's Airport Time Capsule.. this is wrong on so many levels.
    It will be a total pain on windows.. use FBATC or TC or anything you like.. as long as it follows the rules..
    Short 2-20 characters.. less than 10 is better.
    No spaces.
    Pure alphanumeric.
    All names must comply.. TC name and wireless name/s
    2. Load the airport utility for windows into the computer.. you can download for up to win7.. apple haven't bothered with windows since then and are pretty out of date. The win7 utility will load on win8 with the usual voodoo and astrological help.
    3. Windows must be set to home for location.. if you cannot open a command window and ping the TC by ip and name, then pull down the firewalls.
    4. In windows explorer type into the address bar directly.
    \\TCname or \\TCIPaddress (using, of course, the real name or real IP).

  • How to use external library in EAR deployed onto J2EE engine

    For certain reasons some classes in .jar file in operation system level should be used in the EAR project I've deployed onto J2EE Engine.
    Can some one tell me what steps I should perform to acheive this?

    hey there,
    Think im already late for this... but it may be useful to someone who reads this forum later.
    I am struggling with exactly the same problem for the past more than 24
    odd hours now. The sad part - Im sure I have seen this being done in a
    matter of a few minutes when my team mate had an older version on NWDS.
    (I am currently using SP16 NWDS). May be this indeed is a bug that SAP
    needs to fix in its SP16 NWDS release.
    I need to use the HSSF POI libraries for my webdynpro components and
    have been trying ALL possible options given out here on SDN. To mention a
    few, I have tried -
    1) Jarrod's method of making a Java DC and then declaring a usage
    dependency for it inside a J2EE Server (library) DC. It didnt work... it
    gave me a warning that an illegal reference has been made to the runtime
    public part. And the final SDA file generated in the J2EE server
    component DC DIDNOT contain the jar files that I had added to the public part
    of the Java DC. On investigating further, I found that there were NO
    entities present in BOTH the public parts of the Java DC, even though the
    folder actually contained all the required .jar files.
    2) Creating an External Library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used DC' into a J2EE Server
    (library) DC. Yet, the .sda file that is created on building the J2ee
    Server (library) DC DOESNOT contain the JAR files.
    3) Creating an external library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used  DC' into a webdynpro
    DC. On building this webdynpro DC, the .ear file DOESNOT contain the JAR
    files.
    4) Directly adding the JAR files to my own webdynpro component in the
    'src/packages' folder. This didnt work because on rebuilding the
    project, the JAR files get deleted on their own.
    5) Renaming my .JAR files to .ZIP, extracting the entire package
    structure into folders, copy pasting this entire folder structure along with
    its .class files into the src/packages folder. On rebuilding, the NWDS
    deletes these folders and files on its own / behaves erratically. Also
    copy pasted these .class files along with the proper package structure
    into the '/bin' directory of my webdynpro application, but it still
    didnt work.
    The only thing that I have to try yet is to shift to SP10 of NWDS,
    build this external library project and get the required JAR files put on
    the wendynpro server. After that I might choose to get back onto the
    SP16 version and hopefully continue productive work... !
    Regards,
    Navneet.

  • Has anyone tried using a JavaScript External Library with 64bit InDesign?

    I have an event listener that calls a JavaScript file. The JS script uses a c++ external library. All works fine with 32 bit InDesign including the new cloud version, but I get an "I/O error" when trying to load the library from  a 64bit InDesign generated event. I have even tried using the sample project BasicExternalObject and get the same error.
    Any thots would be greatly appreciated.
    Ron R

    Hi Zhiqiang_Li <http://forums.adobe.com/people/Zhiqiang_Li> ,
    Yes, I got this working some time ago. I am not a mac user but perhaps the general principle is the same:
    In Windows 64, if your application is compiled 64bit then you can only access InDesign 64bit and its object library. However if your app is 32 bit then you can only access InDesign 32bit and its object library.
    Sorry I don’t know more about the mac. All of our users (200+) use InDesign for windows so of course our app is also windows based. Does the mac support both a 32 and 64 bit version of InDesign? If not my solution will not be much help.
    Ron
    United Bible Societies Association, a company limited by guarantee.
    Registered in England and Wales No 2264875. Registered Charity No 800058
    Registered Office: Stonehill Green, Westlea, Swindon, Wiltshire, SN5 7PJ,
    England.

  • I have an IMAC and I'm running OSX 10.9.2.  I'd like to store my Aperture /IMovie Libraries to an external hard drive.  In addition, I'd like to partition the external hard drive so that Time Machine can use it to both back up my IMac and the externa

    I have an IMAC and I'm running OSX 10.9.2.  I'd like to store my Aperture /IMovie Libraries on an external hard drive.  In addition, I'd like to partition the external hard drive so that Time Machine can use it to both back up my IMac and the external library drives.  Is this possible? Can I set up a RAID 5 format for redundancy?

    I'd like to store my Aperture /IMovie Libraries on an external hard drive.
    That is fine and recommended.. use the fastest disk you can afford.. ie Thunderbolt>USB3>FW800>USB2.
    In addition, I'd like to partition the external hard drive so that Time Machine can use it to both back up my IMac and the external library drives.
    Let me be clear.. you want to partition the one disk.. use it for TM and move your files to the external disk.. and then backup to the same disk.. You can do it.. but that is not a backup.. that is an experiment in how long you can get away with running files and backups on the same disk before you lose everything.. like Russian Roulette.. pull the trigger enough times and laws of probability will do you in.
    You must have backups on a different disk .. otherwise it is pointless.
    Can I set up a RAID 5 format for redundancy?
    No.. you can buy special USB and Thunderbolt external drives that support RAID..
    BUT that is still not a backup.. let me show why.. you make a silly move and corrupt your file in aperture.. it is not that rare.
    Raid will corrupt all copies of the files.. it is replicated across all disks.
    Delete a photo it is deleted across all disks.. you have no recovery.
    Alway, always consider RAID system one disk.. backup onto another disk.. and if the photos or movies are at all important to you.. ie your family .. make another copy and store in a relatives house.. There is no such thing as too much redundancy.

  • Using External Library in a DC problem (SP16)

    Hi,
    I've been trying to get the example that Valery is outlining in his <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro">Blog</a>.
    I've done it exactly as Valery says, but I can't get it to work. I create the External Library DC, add the jar to Public Part (purpose Assembly) and build. Builds ok.
    I then proceed to creating the J2EE Library. It is created ok. I then add the External Lib I just created to Used DCs. This goes ok. I build the DC. There are warnings:
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    And:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    I've tried nearly every combination of Dependency Types When adding the used DC to J2EE DC. The jar never ends up in the SDA file in gen\default\deploy or jar in gen\default\public. I only get different types of warnings.
    Here is the whole build.log:
    Apr 7, 2006 8:48:00 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: js/lib: built with warnings orion.com/js/lib(MyComponents) in variant "default" (0.753 sec) :
    Build log -
    Development Component Build (2006-04-07 08:48:00)
      Component name: js/lib
      Component vendor: orion.com
      SC compartment: MyComponents
      Configuration: LocalDevelopment
      Location: local
      Source code location: jarpak@UFIES-JARPAK
      DC root folder: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\
      DC type: J2EE Server Component
      DC subtype: Library
      Host: UFIES-JARPAK
    DC Model check:
              [dcmake] All used DCs are available locally
              [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/addLib"
              [dcmake] validating dependency to  public part "Tokenizer" of DC "orion.com/js/jars"
              [dcmake] DC model check OK
    Start build plugin:
              [dcmake] using build plugin: sap.com/tc/bi/bp/addLib
              [dcmake] starting build plugin from : C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\
    Build Plugin 'J2EE Library', Version 6.40 SP 16 (630_VAL_REL, built on 2006-02-13 00:17:07 CET)
       development component:  js/lib (orion.com)
          software component:  MyComponents (demo.sap.com)
                    location:  local
                        type:  J2EE Server Component, subtype Library
               build variant:  default
             source location:  jarpak@UFIES-JARPAK
           plugin start time:  2006-04-07 08:48:00 GMT+02:00 (EEST)
                     Java VM:  Java HotSpot(TM) Client VM, 1.4.2_03-b02 (Sun Microsystems Inc.)
    General options:
      convert *.xlf to *.properties: yes
      include sources for debugging: yes
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    Preparing data context..
    No 'default' JDK defined, will use running VM.
    Data context prepared in 0 seconds
    Executing macro file..
      Using macro file:     C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\macros\build.vm
      Creating output file: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
    Macro file executed in 0.482 seconds
    Starting Ant..
      Using build file:     C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
      Using build target:   build
      Generation folder:    C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426
      Using Ant version:    1.5.4
    prepare:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\int-pp
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sda
    compile:
    createPublicParts:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    packDeployArchive:
    [srcpacker] Creating source archive
    [srcpacker] No sources available for packing, no archive will be created.
         [timer] Source archive creation finished in 0.02 seconds
        [jarsap] Info: JarSAP version 20041217.1600
        [jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060106.1831
        [jarsap] Property jarsap.info.dir is not set.
        [jarsap] Building: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy\orion.comjslib.sda with compression
         [timer] JarSAP finished in 0.03 seconds
    build:
    Ant runtime 0.161 seconds
    Ant build finished with WARNINGS
    Build plugin finished at 2006-04-07 08:48:00 GMT+02:00 (EEST)
    Total build plugin runtime: 0.693 seconds
    Build finished with WARNING
    What am I doing wrong ?
    Kind Regards,
    Jari Pakarinen

    Hi,
    There is an issue with SP16 in using External library DC.
    Go through this Jars not included in J2EE Library DC SDA. This thread deals with the same issue.
    Hope this helps.
    Regards,
    Rathna.

  • Problem using External Library DC

    Hello,
    First of all, I'm a java programmer kind of new to NWDI. I'm working on a Java DC that's meant to send e-mails which of course uses the JavaMail API, so I understand I have to add to my SC another DC of type External Library that contains the jar files I need. Here is where it all falls apart. I have followed step by step several possible solutions to this and still gettin' the "import cannot be resolved" error message in my Java Perspective. The procedure I'm using is the one described in this thread:
    Re: External Library DC question
    Can anyone help me out with this? I'm using NWDS 7.0.14
    Thanks in advance...

    HI,
    That post was to big. so without reading it im posting.
    1 create a library DC.
    2.Add the jar files in it.
    3. create a public part of type API and SDA.(use SDA if you want to deploy it with the project(just like an add external jar file) or use API part (if you want to use it as add jar file option))
    4. use that public part in you DC.
    5. use add jar option in your build path.
    if you have done these an having an error please tell me at what step you have a problem

  • Help!! I Can not deploy external library to the J2EE Engine!

    I'm trying to create a J2EE Library DC that contains a few jar files that I want to deploy to the J2EE server for usage by a set of test classes.
    I created an external library DC, imported a jar file into the libraries folder, and added the jar file to a public part that has selected option "provides an API for Developing/compiling". I then built the DC Successfully.
    Then I created a J2EE Library DC, and added the external library DC as a used DC, with a build and run time dependancy, and I created an entity reference to the external library DC's public part.
    When I build the J2EE Library DC, the jar file are not included in the SDA file. Nothing I've tried can get the jar file to be placed in the SDA file for deployment.
    Why is the jar file not in the SDA? What am I doing wrong? I've spent the last while reading everything I can find on SDN about j2EE Library DCs, and it seems that I'm doing everything correctly - or am I?
    I'm running 7.00 SP9 . Can someone verify that a) my procedure above is correct, and b) that this does work under 7.00 SP9 ?

    a) the runtime dependency from the J2EE library to the external library is not necessary and will be ignored during build. There may be a warning in the build log about incompatible runtime-types, but I'm not sure if that warning exists in SP9.
    b) see Pascals latest answer regarding a patch for this issue.
    Regards,
    Marc

  • I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    If you right mouse and select Get info it will show you the Apple ID used to purchase these songs.
    Usually the name of an apple id is based on the email. So knowing that you may have forgotten the Apple ID password.
    You can request a new password here http://www.apple.com/support/appleid/

  • HT5260 Hi, my name is Gerard and my iphoto library is getting very large I would like to know if I can store all or most of my photos in a external hard drive and access them from Aperture?

    Hi, my name is Gerard and my iphoto library is getting very large I would like to know if I can store all or most of my photos in a external hard drive and access them from Aperture?

    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    LN

  • IPhoto opens but then the spinning rainbow wheel appears and I can't do anything. I have opend iPhoto with the Option key pressed and rebuilt the library and it still happens.  I want to at least access my photos and copy them to an external drive.

    iPhoto opens but then the spinning rainbow wheel appears and I can't do anything. I have opend iPhoto with the Option key pressed and rebuilt the library and it still happens.  I want to at least access my photos and copy them to an external drive. Anyone have ideas on how to get to them?

    Make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • My "Library" module suddenly disapeared and I can not access my images. How do I find my folders if there is no "library" button?

    My "Library" module suddenly disapeared and I can not access my images. How do I find my folders if there is no "library" button?

    You've merely inadvertently hidden it.
    Hiding/unhiding panels and modules is a little known feature of Lightroom which seems to put the fear of God into unsuspecting newbies who are not aware of the feature.
    Right-click (CTRL Click on Mac) on the Module names and restore the check mark to Library.

  • I seem to have lost my original images and unwanted images have moved into my library. I couldn't access lightroom 3 as usual and was provided a default option which I clicked. I ely heavily on lightroom and have spent countless hours fixing images, ple.

    Hi, I seem to have lost my original images and unwanted images have moved into my library. I couldn't access lightroom as I would normally and was provided with a default option which I clicked. This all occured while I was trying to free up space on my computer while viewing saved images on my hard drive, which are linked up directly to a photoshop elements program. Please tell me this can be fixed.....

    Hi there,
    I don't believe I did move or delete my catalogue. Where can I look for my catalog file. Why does my Lightroon now contain more images and ones I don't want on it, without my physically importing them?
    Thanks
    Pablo

  • Just bought a 2tb external hard drive with the intention of moving my iPhoto data files on it. I have so much of my 500 gigs being used up by images and video. Questions: Will this foul up my iPhoto app? Do I need to point iPhoto to this new location?

    Just bought a 2tb external hard drive with the intention of moving my iPhoto data files to it. I have so much of my 500 gigs being used up by images and video. Questions: Will this foul up my iPhoto app?
    Do I need to point iPhoto to this new location?
    Thanks!

    Are you running a Managed or a Referenced Library?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management.
    Assuming a Managed Library:
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit iPhoto
    2. Copy the iPhoto Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching iPhoto. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Regards
    TD

  • Relocating Image Folders to External Drive where LR library resides...

    I have 12,500 images on my main drive in my Pictures Folder (MAC), and the LR library/catalog file (also on my main drive) automatically looks to that folder when I open LR. But I just moved my LR Folder (library, etc.) from my main drive to an external drive. When I opened LR again and chose the library on the external drive, what shows up in FOLDERS down the left side is my PICTURES folder and all my RAW file folders from my main drive. I've already made a physical copy (by drag/drop) of each of those RAW folders onto the external drive, but how to I get LR to recognize/access those, and not the PICTURES folder on the main drive?
    Thanks for your help,
    Brenda

    The easiest way is to "loose" the images and then "find" them again. You could remove the images from the drive so LR fails to locate the images, but it's easier just to rename to folder on the main drive that contains all your images.
    Then start Lightroom. All your folders will be in red. Right click on the main folder and click "locate missing files" then point to the new location.
    Gordon

Maybe you are looking for