This should work just fine. Certainly having the latest PTFs will help, but based on what you describe below (about renaming the _en_us and having it work), I wonder if it is not possible that you are running into a case sensitivity problem. For instance, I just recreated your problem by creating the properties file with the name Foo.properties instead of foo.properties (the latter worked fine). I used Wordpad and a mapped drive to create the file each time. Frances Stewart Java II and Applications Enablement External: (507) 253-2795 Tie-line: 8-553-2795 IBM Rochester Gary L Peskin <firstname.lastname@example.org> on 08/23/2000 01:50:33 AM Please respond to JAVA400-L@midrange.com To: JAVA400-L@midrange.com cc: Subject: getResource() problem I'm on v4r4 using jdk 1.1.7 with a very old PTF level. I have a program that issues a ResourceBundle.getBundle("com.a.b.foo"). The resources are in a properties file called foo.properties. The properties file is in the same jar as the class that contains the getBundle call and the path in the jar for the foo.properties file is correct. However, I keep getting a MissingResourceException when executing the getBundle. The message with the MissingResourceException is "can't find resource for com.a.b.foo_en_US" I created a *JVAPGM for my jar file with OPTIMIZE(10) and I'm executing with RUNJVA INTERPRET(*OPTIMIZE). If I extract the foo.properties file from the archive and place it on my classpath, java still can't find it. However, if I change the name to foo_en_US.properties, java is able to find it. Here are my questions: 1. Is this a bug that is fixed in a PTF? I couldn't find a PTF matching this description in my search. I've asked the systems people to download and apply the latest group PTF so maybe this will clear things up. 2. Does AS/400 jdk 1.1.7 support finding a .properties file in a jar on the classpath to satisfy a getBundle() request? Any insight would be appreciated. Thanks, Gary +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: email@example.com +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: firstname.lastname@example.org +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.