Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

deployment and resource bundle problem

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all
I have a problem when deploying a war file into Java Web Start. The war file consists of several jar files, and one of the jar files contanins several *.properties files(such as I attempt to find the properties file by the following code:
InputStream is = this.getClass().getResourceAsStream("/");
Properties prop = new Properties();
String initCtxFactory = prop.getProperty("myproperties");
but it fails to find the properties file.
Can anyone provide me with the solution to this problem?
Thanks in advance!
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey...I'm no expert on this, but I solved it once by asking the classloader to provide me with the resource.
Try this:
Hmm..Give it a shot.
Cheers from sunny south africa.
Look! It's Leonardo da Vinci! And he brought a tiny ad!
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF
    Bookmark Topic Watch Topic
  • New Topic