Eclipse can be decieving. You have to be really sure the properties file you
are referencing really ~is~ on the classpath when you run it in eclipse. My
guess is that it is not. This usually isn't an issue if the resources you
are referencing are in the same tree as your java sources.

Not to worry though.. If you go to Project->Java Build Path-> and add in
whatever folder contains your .properties file as either a new source folder
or into the library path (as a class folder) it should pick it up. (maybe
...you'll have to play with it)

On 6/8/06, Dan Adams <[EMAIL PROTECTED]> wrote:

I have static method where i need to read a .properties file off of the
classpath. The same code that works when running under a tapestry
application in jetty does not work when run as a normal java program in
eclipse. It's a static method and we're getting the resource using:

ThisClass.class.getClassLoader
().getResourceAsStream("/path/to/resource.properties");

Any suggestions?

--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to