• 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

Beginning locales ...

 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm getting the following exception :



And here's my source code :



I think that the location where i have places the messages.properties file is wrong.

In eclipse, i have create a folder named bundles and placed it there.

Please can you guide me on where to put the .properties files and how to instruct the compiler reading them ?

Thanks in advance ...
 
Ranch Hand
Posts: 72
Scala Monad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The properties file should be available in the classpath. In eclipse, the properties file in the source folder will automatically be copied into the output folder. So either you can place the properties file in the existing source folder or you can add the folder which contains it as a source folder.

1) assume 'src' is your source folder and you have,

${PROJECT ROOT} -> src -> bundle -> messages.properties

then the code should be,



2) assume 'src' is your folder,
${PROJECT ROOT} -> src and ${PROJECT ROOT} -> bundle -> messages.properties

You are now adding 'bundle' as source folder in addition to 'src' then your code should be,

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic