• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Missing Resource Bundle Exception

 
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am preparing for Oracle Certified Professional Java Programmer SE-8.
I have a doubt regarding localization in which we use the properties file.

This is my property file:-
Zoo_hi.properties-
hello=Namaskar
open=Zoo Khula hai
close=Zoo Bundh hai
thanks=Dhanyavaad

and this is my class-


first i had put the properties file in the folder where my class file is present, after the execution i got - "Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name resoucebundles.Zoo"

later i replaced the file in a folder called resources in the same workspace and got the same exception again.

Then i tried with Java Class Resource Bundle-

for which also i got the same exception. Is their any specific way to create resources?
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this class in a package?
 
Jacky Stark
Ranch Hand
Posts: 45
2
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah sheriff, the class is in the package
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jacky Stark wrote:Yeah sheriff, the class is in the package


Which implies you need to add a package name to:

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic