Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-10-14
4
Medium Priority
?
876 Views
Last Modified: 2011-09-20
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
Comment
Question by:djdc74
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 12305935
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
 

Author Comment

by:djdc74
ID: 12306011
Ok.
Really Thanks !!!

0
 

Author Comment

by:djdc74
ID: 12306013
With Class-path: .
problem solved.
Really Thanks.
0
 
LVL 92

Expert Comment

by:objects
ID: 12306026
no worries :)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question