× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: getResource() problem
  • From: Gary L Peskin <garyp@xxxxxxxxxxxx>
  • Date: Tue, 22 Aug 2000 23:50:33 -0700
  • Organization: The Firstech Corporation

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: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.