java.util.MissingResourceException in Java Program

Hello, 

I can’t seem to Run my Java program because of an unknown reason. I have specified my resource bundle variable as:

private static final ResourceBundle bundle = ResourceBundle.getBundle(
        "net.devbase.jfreesteel.viewer.viewer");

However, it reports that the resource bundle called “viewer” cannot be found. This is how the path to the resource bundle looks like:

Capture.PNG

I have tried different combinations in my variable like:

net.devbase.jfreesteel.viewer.viewer
resources.net.devbase.jfreesteel.viewer.viewer
net/devbase/jfreesteel/viewer/viewer
/net/devbase/jfreesteel/viewer/viewer
resources/net/devbase/jfreesteel/viewer/viewer
/resources/net/devbase/jfreesteel/viewer/viewer

But without luck for some reason the resource bundle cannot be found.

The error message is basically:

java.lang.ExceptionInInitializerError
Caused by: java.util.MissingResourceException: Can't find bundle for base name net.devbase.jfreesteel.viewer.viewer, locale en_US
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1573)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
	at net.devbase.jfreesteel.viewer.EidViewer.<clinit>(EidViewer.java:81)
Exception in thread "main"
Process finished with exit code 1

This is not my code. I found the source on github and just wanted to modify a few things. I’m still a Java beginner and didn’t find any similar problem or solution anywhere.

Thanks in advance.

Look at this or this

2 Likes