Solved

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

Posted on 2004-10-14
4
714 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 50 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now