How to locate a conf file in classpath ? (like log4j)

Hello all,
I am writing a library which reads a configuration file during the first call of a specific method. I would like to offer to users of my library the ability to add the configuration file in the classpath folders (like log4j).
Do you know how I can locate the configuration file?
Thank you in advance, kostas

put it in the classpath and use getResourceAsStream method to find it.
%

Similar Messages

  • In ABAP How to locate an Input file  from a Directory during run time

    I'm loading data from a flat file(text file) into SAP thru BDC programs. All my input files are present in Application server.How to locate an Input file in a directory during run time to process BDC programs programmatically. Are there any in-built functions?Provided me some sample code or any method of doing the same.

    Hello Murali,
    you should ask this question in the ABAP forum.
    Regards
    Gregor

  • (!) How to locate the original file for missing songs?

    song could not be used because original file could not be found. Would you like to locate?
    I got this message when I last tried to synch my ipod.  The message said there were 100 files which could not be found.   Actually more than 100 songs show the exclamation mark that says the file can not be found. 
    Previous posts on this issue suggest the underlying file has been changed or moved out from the ITunes organisation.  Well the last time I synched my ipod on Lion a few days ago it was fine.  On Sunday I wiped my hard drive, carried out the upgrade to Mountain Lion as a clean install, and used Migration Assistant to bring my user data over.  After that I ran cclean and disk utility permissions and disk verification.  Then this happened.
    I migrated my  iTunes Library to an external hard drive six months ago. That was disconnected during the upgrade so I am not sure why the files can’t be found now.    Anyway, I want to recover the missing files .  I could not find them by name, album or artist on the external drive.  So I thought I would find them in Time Machine backup #1.  I couldn’t!.  Nor could I find missing songs on my alternate Time Machine backup #2.  Both Time Machine backups are set to include the external drive.  Songs recognised in iTunes are visible in the backups, but not the ones that are missing.
    I have a third backup volume which was a clone of the Lion setup before I did the upgrade, but I can’t access this or Mac for a few days.
    I did have some permissions failures after the 10.7.4 upgrade which resulted in creating 2 new standard user accounts.  Maybe I’v e got some files across these users?  But in that case I’d have seen problems before the upgrade?   I notice a fair number of these are compilations imported from CD about 4 years ago.  Bu tnot all. 
    (1).  Is there a smart way to list all the files that are missing?
    I can scroll through all of  ITunes Music to see where there are exclamation marks.  I’d like to only list these missing songs.
    (2).  How can I locate the missing media files?
    -  a search on Name / Album / Artist hasn’t found them in live drives or on TM backups.  I’ve still got the missing songs on my iPod, however.
    Once I can answer these questions with your help I’ll know what would be the best way to try to recover, and to work out what went wrong.  I’m shocked that I can’t find them in backup.   Eventually I can restore audio from original source.  If they were photos that went missing from library and backups then I would have no way to get back!
    (3) could this happen in iPhoto?  (shiver)

    Thanks for taking the time to look at my problem.  Shared is empty and I didn't back it up - I only transferred the standard and Admin users to the clean install of Mountain Lion.
    But I got some valuable insight into how the iTunes library is set up from your article on split Libraries. I'd like to see it in the Tips for iTunes for Mac.   My Itunes library was set up in pre-Itunes 8 structure, and as I'd moved it to an external drive it didn't get migrated to the new structure in recent upgrades, perhaps?
    I found your article extremely useful : https://discussions.apple.com/docs/DOC-3991.  That gave me the means to restore the missing files more quickly than getting the original CDs out and re-importing them to iTunes.
    So I've now restored the missing files and started the backups rolling ....
    I still don't understand how they went missing.  However the best backup was the Ipod itself.

  • How to locate my snapshot file ?

    Hi there,
    I know this is an easy question but I am stuck.
    I just did a snapshot & it has a camera click like sound. (I click on the small icon below the window).
    Question is, how do I locate the file ?
    Thanks a lot.
    Cheers

    Todd_Kopriva wrote:
    Are you talking about the Export Frame button in the Program Monitor panel in Premiere Pro?
    I suspect that you're not---that you're actually talking about the Take Snapshot button at the bottom of the Composition panel in After Effects.
    The reason that I'm confused is that you're asking in the Premiere Pro forum, but you mentioned the button making a sound, which happens in After Effects.
    Anyway, if you're talking about After Effects, the snapshots aren't written to disk; that's not what they're for. See this page.
    If you're talking about Premiere Pro, just click the button again, and you'll see the path to where the exported frames are written.
    Sorry Todd for the confusion.
    I am actually talking about AE & I posted on the wrong section.
    And thanks the answer is Compostion > Save Frame As
    Thanks again

  • How to locate SQL database files

    Over the years I've used and discarded any number of applications, many of which created SQL databases.  I'm trying to clean out various odds and ends and would like to know how to search for anything SQL.  I know, for instance, that mail.app uses SQL but I have no idea where to find the database (not that I want to delete Mail!). 
    I'm comfortable using Terminal if that's the way to go.
    Any tips on locating hidden SQL databases would really be appreciated.
    Thanks!

    Similar to when users delete mailbox content, moving user mailboxes doesn't reduce the size of the edb file.  Instead, the database simply gains "white space" which will be filled in before the edb grows any further.  Once your users
    are vacated, you can remove the databases from AD per the cmdlet mentioned above.  as a safety measure, that cmdlet doesn't delete the actual edb files, but once you've run it, yes, you just go and press the delete key on the files.  Obviously "ctrl+a"
    means all files, which isn't what we're talking about.  Just the database and associated log files.
    Mike Crowley | MVP
    My Blog --
    Baseline Technologies

  • HT4859 How to locate backed up files on iCloud

    I restored my iPhone 4S on iTunes and it backed up all my files including my photos and everything on my phones has deleted but how do I find the backed up data? Plea help?
    Thank you

    I don't understand.  If you restored the data back to a device, it should be there.  What do you mean by "how do I find the backed up data"?  If you're trying to access a specific file in a backup on icloud, you can't.  You can only restore all the backed up data to the device.  Once restored, you find your data in the Apple apps like Calendar, Reminders, etc.

  • How to locate and use files in Bridge

    A great deal of my photos were imported into my iMac using iPhoto and they seem to reside in the iPhoto database/library.  When I try to browse them in Bridge CS4 the iPhoto directory appears but when I click on it iPhoto opens and that's the only way to see the files, though I AM able to open them in PS CS4!  How can this be corrected?

    Easiest way is to go to user / pictures and select iPhoto library. Use right
    mouse click and from the drop down menu choose show package content. In this
    window go to the folder originals and copy the folder(s) that show here
    (usual folders with years showing) to a new folder on your HD.
    If you choose copy you will double the size of the existing originals on
    your HD but then you are still able to use iPhoto for editing etc. If you
    have no longer need for that you can choose move without copy to save disk
    space if needed.
    Point Bridge to the new folder and use the menu tools / cache build and
    export cache. This will cache your folder including all the subfolders.
    Let it do its job and then you can work with the files as normal with
    reorder by moving them to other folders or rate or what ever you want.
    When I try to browse them in Bridge CS4 the iPhoto directory appears but when
    I click on it iPhoto opens and that's the only way to see the files, though I
    AM able to open them in PS CS4!  How can this be corrected?

  • How to add an image file in classpath?

    im having problem in my batch file, im having ok output but there's no image or logo in my output pls tell me what can i do to fix this problem?

    Well, going by the question title (since it's hard to understand the body of the question), put the image file in the same directory as the class that picks it up and use getClass().getResource("foo.gif"); to access it.
    e.g.
    ImageIcon image1 = new ImageIcon(getClass().getResource("foo.gif"), "Foo");That will use whatever mechanism is used to access .class files to get the .gif file.

  • How do you save a file to ipad like resume then add it and post to a web sight

    how to save file to ipad then link to job post like reume

    Depends on the application you are using to create the resume. If you're using pages, it will save to ipad and icloud if you set that up.
    How to upload will depend on the web site, they typically will have there own way of uploading or submitting files. Usually a 'upload file' button somewhere on there page.

  • How to Play Documented type file in Firefox like Internet Explorer

    I am student in 3d Graphics, so i viewing some tutorials like Digital Tutors Vedios.So I have a problem to open documented file in FIREFOX. The same file is opening in INTERNET EXPLORER. But I like to use FIREFOX only.

    From what I've seen, none of the Linksys cameras have the option of DynDNS embedded in them. You could try setting DynDNS on your router itself. If you're using a Linksys router, all Linksys routers support DynDNS. Most other routers support DynDNS too.
    Not too sure about hiding the controls in Firefox. Have you tried Safari for Windows? One would think that it should work the same for Windows and Mac OS.

  • How can I make the file download expire like in SendNow?

    In Send Now, you can set up an expiration period for the document so that it is not just hanging out there. I do not see it on Adobe Now. Is this function still available?

    Hi,
    That feature is not available yet.
    Regards,
    Ajlan Huda.

  • How to Locate Original Files in Aperture Once Version Deleted from Library

    I have a very large aperture library (250GB). For a long time, I have maintained my library by deleting only the "versions" of photos that I do not like (File-Delete Version), not realizing that the originals were still there. I would like to also delete the originals (master), since they are large RAW files taking up a lot of space. But with the versions now gone from my library, I do not know how to locate the original files to delete. Is there any way for me to do this?
    I feel like there should be a way to find out if there are any original files not associated with a corresponding version in the library, to allow you to recover accidently deleted files.  That would be a start, but I can't find a way to do it. Thanks.

    Also, I visited the Apple store recently and was told that deleting the version does not delete the master, and they even showed me on their computers where files deleted from the library were stored (they did this by "File-Open Library in iPhoto," highlighting all the images, and then "File-Reveal in Finder-Original File."
    For a managed library: "Delete version" will only delete the selected version, if there is more than one version of the the same image. But if you only have one version left, delete version will delete the original file as well. An original is of no use, if you do not have a version to reference it.  The " File-Delete Original Image and All Versions" option is there to be able to delete all versions at once, together with the original file.
    For a referenced library you will be prompted, if you want to delete the referenced original, if you are deleting the last version.
    Just try it for a managed library. Import an image and use "Delete version" for the last version.  The version will be moved to Aperture's Trash. And if you empty the trash, you will find the original version in the Trash in your Dock. And it cannot be put back from the Trash.
    You will be prompted, if you really want to delete the file, when you empty Aperture's Trash.
    The App Store genius must have shown you a referenced library, when the original was not removed after deleting the version, or they did not delete the last version, if it was a managed library.

  • Is ADF-BC service entry needed in OHS conf file

    HI,
    I have a weblogic server cluster with an Admin Server and 2 managed soa servers. There is an http server which routes the request.
    http server conf file has entries like
    <Location /console>
    SetHandler weblogic-handler
    WebLogicHost soahostadm1s
    WeblogicPort 7101
    </Location>
    <Location /soa-infra>
    SetHandler weblogic-handler
    WebLogicCluster soahostnod1s:8101,soahostnod2s:8101
    </Location>
    So when i deploy an soa composite, due to above entry of soa-infra in mod_wl_ohs.conf its routing properly to managed servers when i test a service.
    BUt what about ADF-BC services? They do not go under soa-infra. Say my adf-bc service has context root of InternalOrderSDO(from FOD), should a entry be made into the conf file?
    and do we need to make such entries every time we deploy the service?
    Thanks
    Manish

    Doing this automatically would challenging as one might be able to use a mod_wls.conf or the like.
    In a development environment you don't need such a configuration, but for a production environment this is good.
    Do the development without the OHS in front, and when moving to production use the URLs through OHS...
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Locating the header files such as msoftcon.h inc++ programing using console graphics lite

    in writing code for the program, I don't know how to locating the header file such as msoftcon.h ,so when this program   was built,an error show "cannot open
    include file:msoftcon.h. I  have already   downloaded  msoftcon.h and msoftcon.cpp from samspublishing website.Please help me how to loate the such header files.

    See this.

  • Easy Switch between xorg.conf files enable disable tvout

    Hello,
    This is my first post on this forum, so i'am not sure were to put my post, but i think here is the best place
    summary:
    Easy Switch between xorg.conf files, and enable/disable startup applications. Script does this:
    detect which xorg.conf file is used and then depending on which one is used do 1 or 2:
    1. copy tvout.conf to xorg.conf and disable all startup applications + enable one or more startup application(s) defined in the script startupappsoff
    2. copy xorg.conf.backup to xorg.conf and enable all startup applications + disable one or more startup application(s) defined in the script startupappson
    I thought it would be nice to share the script i created for an easy switch between two xorg.conf files. Myself preferred to switch between two xorg files for personal need.
    Beside only switching between two xorg.conf files i would like to enable/disable some startup apps, therefor i created the scripts startupappsoff and startupappson.
    If you want to use these scripts, look in this code for comments, and custimize at the points A. to I. Further read the comments on top of each script.
    If something is not clear or is not correct, your free to ask!
    have fun!
    The script to be run to switch:
    tvout
    #!/bin/sh
    #summary: This programm switches xorg.conf file with an other and back. Also it calls the programms startupappsoff and startupappson.
    #in order to get this as a command, copy this program to: /usr/bin/
    #to execute without password, add: <username> ALL=NOPASSWD: /usr/bin/tvout (replace <username> with your own)
    #A. this script needs to recorgnize the different xorg.conf files you want to use. So put on top of your xorg.conf files in the first line: #tvout or #original
    var1=$(head -1 /etc/X11/xorg.conf)
    if [ $var1 == "#original" ]
    then
    #B. put here the path to your own custimized xorg.conf
    sudo cp /mnt/data1/Arch\ Files/xorg.conf.tvout /etc/X11/xorg.conf
    zenity --info --text 'tv-out enabled, to switch press CTRL+ALT+BACKSPACE'
    #C. put here the path to startupappsoff and change username
    su rob /mnt/data1/Arch\ Files/startupappsoff
    fi
    if [ $var1 == "#tvout" ]
    then
    #D. put here the path to your backuped xorg.conf or second custimized xorg.conf
    sudo cp /mnt/data1/Arch\ Files/xorg.conf.backup /etc/X11/xorg.conf
    zenity --info --text 'tft-out enabled, to switch press CTRL+ALT+BACKSPACE'
    #E. put here the path to startupappson and change username
    su rob /mnt/data1/Arch\ Files/startupappson
    fi
    startupappsoff
    #!/bin/sh
    #this programm turns startup programms off and turns only the startup programms defined here on
    for file in $(ls ~/.config/autostart/);
    do
    #switch all startup apps off
    #G. change rob to your own username
    sed -i 's/X-GNOME-Autostart-enabled=true/X-GNOME-Autostart-enabled=false/g' /home/rob/.config/autostart/$file
    #H. switch only these startup apps on, change rob to your own username
    sed -i 's/X-GNOME-Autostart-enabled=false/X-GNOME-Autostart-enabled=true/g' /home/rob/.config/autostart/appchk.desktop
    sed -i 's/X-GNOME-Autostart-enabled=false/X-GNOME-Autostart-enabled=true/g' /home/rob/.config/autostart/yakuake.desktop
    done
    startupappson
    #!/bin/sh
    #this script turns all startup programms of, and only turns on the startup programms defined here:
    for file in $(ls ~/.config/autostart/);
    do
    #switch all startup apps on
    #I. change rob to your own username
    sed -i 's/X-GNOME-Autostart-enabled=false/X-GNOME-Autostart-enabled=true/g' /home/rob/.config/autostart/$file
    #J. switch only these startup apps off, change rob to your own username
    sed -i 's/X-GNOME-Autostart-enabled=true/X-GNOME-Autostart-enabled=false/g' /home/rob/.config/autostart/xbmc.desktop
    done
    Last edited by Rob (2010-11-24 14:10:58)

    Many thanks, I am actually using your script minus the app changing script - to change my xorg from my dual screen display to a single screen display and my s-video tvout.
    Now I need to tune my xorg to work, but I am trying to add the <username> ALL=NOPASSWD for the script to work without password but I do not know where to add the line and the format of the line?
    Again many thanks for your script,
    looking forward for your reply,
    Regards

Maybe you are looking for