Link to home
Start Free TrialLog in
Avatar of djdc74
djdc74

asked on

java.util.MissingResourceException: Can't find bundle for base name

Hi, I´m developping a swing application, and I want to internationalize it.

I have 3 resource files : languageText, languageText_es_ES, languageText_en_US.

My app crashes on the sentence
        java.util.ResourceBundle.getBundle("languageText",mLocale);
but only crashes when the application is compress in a jar file.

The structure of jar file are a package named  circOffline, with a main class named offline.
The resource files are in the same directory than jar file.

I have a windows folder called TEST.
The content of TEST are : the jar file; the 3 resource files; and a bat file to launch the application who contains "javaw -jar offline" (offline is the name of the jar).

I always obtain the error : java.util.MissingResourceException: Can't find bundle for base name languageText, locale es_ES.

However, if I uncompress the jar file and execute javaw circOffline.offline, all run fine.

The classpath of the machine, points to TEST folder.

Some idea ??
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of djdc74
djdc74

ASKER

Ok.
Really Thanks !!!

Avatar of djdc74

ASKER

With Class-path: .
problem solved.
Really Thanks.
no worries :)