Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 958
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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