Skip to Content
Former Member
Jan 16, 2008 at 08:34 AM

File not found, Missing resource bundle



I have a problem in accessing files (XML and Resource bundles) in Java projects. I used to access these files in WD Java. The same piece of code does not work here.

e.g. When I create a new file object by providing the path name I get a file not found exception. The file exists in my package and I call it this way:

File f = new File("file.txt"); then in an input stream but it doesnt work. However in a J2EE project the same code works.

Similarly the resouce bundle never seems to work even if I give the fully classified class name for the property file. I can access property files in WD Java with ease. I understand that the root path changes and hence the problem. How should I solve it? Is there an elegant way which makes it work in all cases? Please throw some light on the root path for these projects. Thank you.



Edited by: vln on Jan 16, 2008 9:34 AM