You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Geoff Fortytwo <g4...@snowball.com> on 2002/02/01 02:18:33 UTC

TurbineConfig constructor that doesn't use path

The TurbineConfig class requires a path to the TurbineResources.properties. 
This means that it's impossible to store the TurbineResources.properties 
file inside a jar file. It also means that I'm forced to use the same path 
on different machines or specify the path in some external way.

It would be better if TurbineConfig had an additional constructor which 
allows the user to specify a class location. TurbineConfig would then use 
the java.util.ResourceBundle.getBundle function to load the properties file.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TurbineConfig constructor that doesn't use path

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Daniel Rall <dl...@finemaltcoding.com> writes:

> You actually want ClassLoader::getResourceAsStream(String), which
> takes a patch relative to your classpaths.

Freudian slip, s/patch/path/.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: TurbineConfig constructor that doesn't use path

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Geoff Fortytwo <g4...@snowball.com> writes:

> It would be better if TurbineConfig had an additional constructor
> which allows the user to specify a class location. TurbineConfig would
> then use the java.util.ResourceBundle.getBundle function to load the
> properties file.

You actually want ClassLoader::getResourceAsStream(String), which
takes a patch relative to your classpaths.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>