Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

java.util.MissingResourceException in Java Program

Solved! Go to Solution.

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.

 

1 Reply
Solution
Commander Lvl 1
Message 2 of 2

Re: java.util.MissingResourceException in Java Program

Look at this or this

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!