aspose file tools
The moose likes Java in General and the fly likes deployment and resource bundle problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "deployment and resource bundle problem" Watch "deployment and resource bundle problem" New topic
Author

deployment and resource bundle problem

JHM Lin
Greenhorn

Joined: Nov 10, 2003
Posts: 9
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 system.properties). I attempt to find the properties file by the following code:
InputStream is = this.getClass().getResourceAsStream("/system.properties");
Properties prop = new Properties();
prop.load(is);
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!
Martin Coetzee
Greenhorn

Joined: Dec 02, 2003
Posts: 21
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.
Martin
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: deployment and resource bundle problem
 
Similar Threads
Don't see properties files after deployment from Jdeveloper 11g
Context root in 4.1.24
classpath ?
Reading properties file in jar META-INF
JBoss class loading and reading .properties files