Can't find bundle for base name

I'm using a library that has a dependency on jfreechart (v 1.0.9).

When I try to run the .jar, I get:

java.util.MissingResourceException: Can't find bundle for base name
        org.jfree.chart.LocalizationBundle, locale en_US
    at java.util.ResourceBundle.throwMissingResourceException
    at java.util.ResourceBundle.getBundleImpl(
    at java.util.ResourceBundle.getBundle(

I've tried creating a file, but that didnt do it. I've checked the CLASSPATH, still no go.

Any ideas?


java.util.MissingResourceException: Can't find bundle for base name
    org.jfree.chart.LocalizationBundle, locale en_US

To the point, the exception message tells in detail that you need to have either of the following files in the classpath:






Also see Sun's own tutorial about resourcebundles for more information.

But as this is actually a 3rd party managed properties file, you shouldn't create one yourself. It should be already available in the JFreeChart JAR file. So ensure that you have it available in the classpath during runtime. Also ensure that you're using the right version, the location of the propertiesfile inside the package tree might have changed per JFreeChart version.

When executing a JAR file, you can use the -cp argument to specify the classpath. E.g.:

java -jar -cp c:/path/to/jfreechart.jar yourfile.jar

Alternatively you can specify the classpath as class-path entry in the JAR's manifest file. You can use in there relative paths which are relative to the JAR file itself. Do not use the %CLASSPATH% environment variable, it's ignored by JAR's and everything else which aren't executed with java.exe without -cp, -classpath and -jar arguments.

BalusC is right. Version 1.0.13 is current, but 1.0.9 appears to have the required bundles:

$ jar tf lib/jfreechart-1.0.9.jar | grep 

If you are using IntelliJ IDE just right click on resources package and go to new and then select Resource Boundle it automatically create a .properties file for you. This did work for me .

When you create an initialization of the ResourceBundle, you can do this way also.

For testing and development I have created a properties file under \src with the name

Use this way:

ResourceBundle rb = ResourceBundle.getBundle("prp");

Naming convention and stuff:

Need Your Help

Write text files without Byte Order Mark (BOM)? encoding file-handling byte-order-mark

I am trying to create a text file using VB.Net with UTF8 encoding, without BOM. Can anybody help me, how to do this?

Can not set debuggable flag in AndroidManifest.xml

android android-ndk android-manifest

I try to accomplish this tutorial to learn debugging NDK apps, but when I set android:debuggable="true" in AndroidManifest.xml file the following error occurs: