My program cant find the locale-specific resourcebundle in the programs jar

hi!
i got a serious problem loading my resourcebundles from a jar file.
it seems to be a often-talked-about problem in this forum but i didnt find an answer yet.
please help me with this stuff:
i made two resourcebundles for testing purposes in the following directory hierarchy:
de/juw/jlogin/server/resources/....
Text_de.properties
Text_en.properties
(no default properties wanted)
this class shall load the resourcebundle (de.juw.jlogin.server.ServerTool):
package de.juw.jlogin.server.ServerTool;
public class ServerTool {
private ResourceBundle rb;
private Locale locale = Locale.getDefault();
.... blah blah...
public static ResourceBundle getResources() {
if (rb == null) {
rb = ResourceBundle.getBundle("resources/Text",locale);
return rb;
when i run that program (contained in a jar) it doesnt find the requested properties-file but works fine if all classes and the properties are outside of it.
please help! i already spent two days on searching that forum and other sources without any results. i want that program (including the properties) in a jar-file.
big thanks in advance

I put my properties file and all other resources under in a resources directory in my jar e.g.:
<package>/resources/App.properties
<package>/resources/start.gif
<package>/resources/login.gif
Then in a Properties class I do this to get the properties:
private static Properties getProperties() {
Properties p = new Properties();
try {
p.load(getPropertiesInputStream());
} catch (IOException ioe) {
ioe.printStackTrace();
return p;
public static InputStream getPropertiesInputStream() {
return CProperties.class.getResourceAsStream("App.properties");
And to extract individual properties, something like this:
public static String getReportDirectory() {
Properties p = getProperties();
return p.getProperty("Report.Dir");
NB. Properties file entries should look like this:
Report.Dir=/apps/reports

Similar Messages

  • Hi, G550 i wont to burn facroty defult disc, the recovery program cant find the partition of lenovo.

    Hi, i have G550 i wont to burn facroty defult disc, the recovery program cant find the partition of lenovo, but i see its there i think the letter of the pratition is change... what can i do? (how much DVDs i need, in the program i see 3 DVDs but all the partition is like 5GB?)

    The partition letter can't be changed because it's hidden (at least you use a specific software or specific commands).
    The factory disk set are 2 DVDs more and less.
    Did you modify your partition schema?
    IPnaSh
    First Spanish Community Guru - Colaborador ad honorem

  • I am running a photoshop cc with my cintiqu 22 DTH2200, why I cant find   multi-touch gesture option under the perference/experimental feautre...??

    I am running a photoshop cc with my cintiqu 22 DTH2200, why I cant find   multi-touch gesture option under the perference/experimental feautre...??

    Because...it's already enabled (under Windows 8 systems)? 
    Is it not working on your Cintiq?

  • I cant find anywhere t click agree on the i tunes license

    i cant find anywhere to click agree on the i tunes license agreement i can read it but i cant agree to it.

    Try just pressing enter when it is displayed...
    tt2

  • When you expand to show local and remote sites, in DW CS6 how do I get the local to be on the left?

    When you expand to show local and remote sites, in the previous verions of DW, the files type (local or remote) selected when not seeing both, automatically came up on the left.  I liked local when I am editing and when I am ready to upload I expand to see both local in remote.  Before, the one you had selected, in my case local, was always displayed on the left.  Now in CS6 when I have local selected before I expand, the local is on the right and remote on the left. For me that is not correct.  I find that having local on the left works best for me like reading, left to right, I want the local on the LEFT so I can put the updated from left to the remote on the right. 
    -->In DW CS6 how do I get the local to be on the left?

    Thank you so much!  That did it! 

  • How to pass the local file name to the workflow in TC OAWD

    Hi everybody!
    I have to pass the local file name of the image as a parameter to a workflow in TC OAWD.
    By debugging I found the FM which starts the workflow -  'ARCHIV_PROCESS_FAXINPUT' . It has two importing parameters : FRONTENDPATH and BASICFILENAME, but they are not used by calling the FM.
    Do you have an idea if there is a DDIC table, which contains the local file name or another way to solve the issue.
    Thank you in advance.

    Hi,
    Not sure of what you want.
    Have a look at v$session view. Machine column is maybe what you're looking for.
    If you want to retrieve the local host executing remote desktop, it's actually not possible natievely, since it's still remote host that is connecting to the database.
    Hope it helps.

  • Can somebody can tell me is CC for team can support to save the files in the local area without using the cloud ?

    Can somebody can tell me is CC for team can support to save the files in the local area without using the cloud ?

    The desktop applications are still installed on your computer, and the files are also saved on your computer.
    Optionally you can upload files with a browser to https://creative.adobe.com/files, or sync up files using the file sync that is part of the Creative Cloud desktop application. The online file storage is private to you, no one else can see it your files.
    If you do want to share your files there are two options:
    You can Collaborate, which is sharing a folder with another Adobe ID. Only the person you collaborate with can see the folder.
    You can use Send Link to send a publicly accessible url to a file or folder.

  • How to get the local lan connecting all the system names ?

    how to get the local lan connecting all the system names using java?
    any body know then send the coding or solution

    This question is asked and answered repeatedly. Search the forum.

  • Mismatch in the local time when using the RWTime.

    Hi All,
    RWTime is showing +1 Hr excess for the local time.
    Compared the time with the ouput of unix date command as well.
    $ cat time.cc
    #include <iostream>
    #include <ctime>
    // Roguewave headers
    #include <rw/rwtime.h>
    #include <rw/rwdate.h>
    #include <rw/zone.h>
    int main()
       // current date/time based on current system
       time_t now = time(0);
       // convert now to string form
       char* dt = ctime(&now);
       std::cout << "\nThe local date and time is: " << dt << std::endl;
       // convert now to tm struct for UTC
       tm *gmtm = gmtime(&now);
       dt = asctime(gmtm);
       std::cout << "The UTC date and time is:"<< dt << std::endl;
       std::cout << "-----------------------------------------------" << std::endl;
       // Roguewave counterparts
       RWTime t;
       std::cout << "\n[RW] The local date and time is: " <<
                    t.asString() << std::endl;
       std::cout << "\n[RW] The UTC date and time is : " <<
                    t.asString((char)NULL, RWZone::utc()) << std::endl;
       std::cout << std::endl;
       return 0;
    $ CC -m32 -g -library=rwtools7_std -o test time.cc
    $ ./test ; date
    The local date and time is: Fri Jul  1 14:55:18 2011
    The UTC date and time is:Fri Jul  1 09:25:18 2011
    [RW] The local date and time is: 07/01/11 15:55:18
    [RW] The UTC date and time is : 07/01/11 09:25:18
    Fri Jul  1 14:55:18 IST 2011
    $The header rwdate.h has following definition for default constructor.
    RWTime() : sec(RWTime::currentTime()) {;}     // current timeSeems like a bug in RWTIme::currentTime() functionality.
    Could someone conform the same (or) am i using RWTime wrongly ?
    Thanks & Regards,
    Sreekar

    I tried your code using the same compiler on OEL 5.4, which is based on RHEL 5.4. I got correct answers for my time zone -- US-Pacific with Daylight Savings Time.
    What time zone are you in (GMT+1 or GMT+2), and is DST supposed to be in effect?
    The likely sources of the problem are that your machine does not set DST correctly, or that you are in an area for which RW Tools.h++ cannot provide a correct answer. (There are some places where the local rules can't be expressed in the limited representations of time zones and DST in Tools.h++)
    What is the value of environment variable TZ?
    Edited by: Steve_Clamage on Jul 5, 2011 9:31 AM

  • Will the local VZW stores have the Iphone 6 plus on the 19th ?

    I didn't pre order the phone because I heard the stores will have them ... Will the local VZW stores have the new Iphone 6 plus in stock on the 19th? ?  Do I need to camp out or get there super early ? ?  This is all new to me ... Any help would be great ...

    They should be available on release day.
    If you really want to make sure to get one I would go there as early as possible.
    Good Luck

  • I cant find it in any shops in the

    hi , im looking to purchase the zen v plus 2gb white/green from a shop in england but i cant find it anywhere! Theres plenty of v's but not v plus's.Can anyone?tell me wether it has been released in the uk or not? I would prefer to buy it from a shop in person rather than over the internet.thanks,??????????????ash

    Hi,
    Toshiba product model names have 4 components the family name (Qosmio), the Product Series (G series), the model (G10) and the exact model number (G10-103).
    This number is country specific because almost every country in europe has different demands of hardware, then Toshiba shipps different models to different countries!
    As far as I know the Qosmio G series will be shipped out across europe in Dez.
    Hint: Be carefull with a buying a foreign toshiba notebook, the whole Software ad OS is also country and language specific! To get the right version of the OS is quite difficult!
    Bye Tom

  • Itunes is asking me for thhe itunes64.msi file and i cant find it, i can't install the new itunes nor open the old one now. someone help me please?

    im having problems installing the newer version of itunes, and removing the older one, im basically itunesless because it keeps on telling me i need the itunes64.msi files which i cant find on my laptop. please help

    You are not addressing Apple here. We are all just users like yourself
    lost/stolen                                     
    No app on the iOS device is required.                           
    - If you previously turned on FIndMyiPod/iPhone/iPad on the iOS device in Settings>iCloud and wifi is on and connected or cellular data is on and connected for, on a computer browser go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up or continue to show off-line.
    - You can also wipe/erase the iOS device and have the device play a sound via iCloud.
    iCloud: Erase your device
    iCloud: Use Lost Mode
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the device and report to police and carrier if iPhone or cellular iPad
    - There is no way to prevent someone from restoring the erase (it erases it) using it unless you had iOS 7 or later on the device. With iOS 7 or later, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                               
    Reporting a lost or stolen Apple product                                              
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • Cant Set System Locale (language for non-Unicode programs)

    Im trying to deploy custom image wherein Input language and location should be English Australia , BUT system locale (language for non-Unicode programs) should be English-us. The requirement is as below
    Standards and Formats: English (Australia)
    Location: Australia
    Default input language: English (Australia) – US
    Installed input languages: English (Australia) – US
    Time zone: Cen. Australia Standard Time
    System Locale
    Language for non-Unicode programs: Default - English (United States)
    Below is my CS.ini
    SkipLocaleSelection=YES
    UserLocale=en-AU
    SystemLocale=en-US
    UIlanguage=en-AU
    KeyboardLocale=0c09:00000409
    SkipTimeZone=YES
    TimeZoneName=Cen. Australia Standard Time
    when image is deployed the language for non-Unicode is also getting set to en-AU while it should be en-US, other language setting are as per the requirement. what should I do :(
    thanks a lot
    Sanju.
     

    that is a little-known known issue
    Check this post:
    http://myitforum.com/cs2/blogs/smslist/archive/2009/01/12/mssms-userlocale-in-mdt-sccm-also-changes-system-locale-9a532hdf.aspx
    He details how to modify the ZTIConifgure.xml file.

  • Event Viewer: How to search and find event with specific text in the EventData

    Hello,
    When I use "Find..." option in the windows event log, it does not search within event's detail or text in <EventData> xml node on the event.
    Is there any easy, out of the box way to find all events that include an specific phrase in the <EventData> ?
    Thank you,

    Hi Allan,
    I‘m writing to check if the suggestions were helpful, if you have
    any questions, please feel free to let me know.
    If you have any feedback on our support,
    please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • I cant find my wireless netowrk connection on the lower roght corner

    My  is Linksys WRT54G2   and for the past few days it worked but i cant see the wirless network connection but my internet connection is fine but yesterday our internet was gone and we fixed it but when i got to my computer i tried playing but there was no internet connection so i tried on my sister's laptop and there was internet but mine doesnt have im trying to find the "Wireless Network Connection" on the lower roght corner of my PC so i can connect but i coudnt find it pls help me.
    any suggestion?
    I really want to play but i still dont hsve internet connection.
    -Clouzalldus

    Are you using a Laptop or a Desktop?
    Things you need to do :
    1. Check the Network Connection. You can find it under the Control Panel. See if the Wireless Connection is Enabled/Disabled.
    2. Check the Device Manager. You can find it on your System Properties. See if you have the wireless adapter installed.
    3. For Laptops. Check if you have the WiFi Switch Enabled. See you Laptop documentation for the WiFi Switch Info.
    Regards,
    Lord Maxthor

Maybe you are looking for