Thanks a lot, it was my mistake, I have got an wrong path for my resources

Am 26.05.2016 um 13:14 schrieb Robert Patrick <[email protected]>:

> I assume that you don't want to put the properties file inside the framework 
> jar (which is the easiest solution).
> 
> If the properties file is always at the same relative path to the framework 
> jar, then you can simply add a Class-Path element in the framework jar's 
> Manifest to include the directory where the properties file lives and it 
> should "just work" without anyone needing to set the Classpath explicitly...
> 
>> On May 26, 2016, at 5:50 AM, Philipp Kraus <[email protected]> 
>> wrote:
>> 
>> Hello,
>> 
>> I’m deploying with Maven a framework (at the moment to my local repository) 
>> and
>> include this framework into other projects.
>> 
>> Within the framework I read a property file with:
>> 
>> final Properties l_property = new Properties();
>> l_property.load( 
>> a_class_within_my_framework.getClassLoader().getResourceAsStream( 
>> "configuration.properties" ) );
>> 
>> On the framework codes this works fine, but if I include with my framework 
>> in another project, it try to read the configuration.properties
>> from the project, not from the framework.
>> I have found out, that I should define the class path, but I don’t know how.
>> In my case the „configuration.property“ should read every time relative to 
>> the framework.
>> 
>> How I can fix this problem?
>> 
>> Thanks
>> 
>> Phil 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to