• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 923
  • Last Modified:

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 ??
0
djdc74
Asked:
djdc74
  • 2
  • 2
1 Solution
 
objectsCommented:
how are you running it?
if its an executable jar then try include . in the jats manifest Class-Path: attribute.

Class-Path: .

or add your bundles to your jar.

0
 
djdc74Author Commented:
Ok.
Really Thanks !!!

0
 
djdc74Author Commented:
With Class-path: .
problem solved.
Really Thanks.
0
 
objectsCommented:
no worries :)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now