This one has got me baffled, so I'm thinking that I need someone else's eyes to take a look and tell me where my mistake is. I'm trying to run a program I wrote (on another machine) that reads a .properties file. However, when I go to run the program, I get the following error:
At first, I thought that it was because the program couldn't find the .properties file. But here's the directory listing, and as you can see, this is located in the Classpath specified by the -cp option to the JVM:
This prgram works fine on the machine that I wrote the program on, but I am unable to get it to run on another machine! Here's the method causing the error:
Down the road this will move to Preferences anyway, but that doesn't help me now. Any ideas what could be wrong?
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I don't see a cause of the problem so far. But one thing you might try is changing the properties file name to Environment_en_US.properties or Environment_en.properties In theory you shouldn't need these; the system should try Environment.properties eventually after finding that no more specific file exists. But try it; maybe you'll learn something useful. Good luck... [ July 16, 2003: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister
Joined: Aug 20, 2001
This is interesting. On the development machine, I moved the code out of the development environment and into another environment and, lo and behold, it stopped working! I then renamed the .properties file so that it was in the root package and the program found it no problem. So that's the solution I'm employing now, but... This baffles me, though. Why would it work in the development environment but not in another environment? (I do use NetBeans for development, but I test everything through command-line or Textpad, which knows nothing about NetBean's settings.) And I've got a similar problem using Jasper reports, where the system can't seem to find the resources (specifically, subreports) even though they're located in the correct places... BTW, Jim , The first thing I tried after posting was adding the _en_US, since I've had that problem before, too. That didn't work, though.... [ July 17, 2003: Message edited by: Joel McNary ]