You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mahammad Nasir <ma...@huawei.com> on 2010/02/23 07:02:28 UTC

Why do i need to put felix.jar in the path if jar file is embeding felix?

Hi..
 
I have written a java application which launches felix. Here i have set the
external library and set the felix.jar. When i lauch the application it
works fine. i dint put the felix.jar in current dir of the applicaiton.
It simply worked.It directly takes the jar from external library path which
i have configured in eclipse project proerties
 
Now, I have witten a jar file which embeds felix. This jar file i am loading
in another java applcation. Now that i am trying to launch this new
application. It doesnt work. It  requires felix.jar to be present in the
current working dir of the application.
 
Why this behavious is like this? Why this setup  is not taking the felix.jar
from the external library?
 
Regards
Nasir
 
 

RE: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by Mahammad Nasir <ma...@huawei.com>.
 


Ok. I would try both.

Thanks again

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Tuesday, February 23, 2010 12:42 PM
To: users@felix.apache.org
Subject: Re: Why do i need to put felix.jar in the path if jar file is
embeding felix?

On 2/23/10 2:56 PM, Mahammad Nasir wrote:
>
> If I don't put the felix.jar in application current dir, its not able 
> to instantiate (or load the class).
>
> I canot send the current code as it is, But later I will try to create 
> a similar example project.
>    

Ok. Still sounds like an IDE issue, perhaps you should try to get it working
from the command line and see if it works as you would expect.

> I will spend some more time on it. May be I am doing some thing stupid!
>
> One more thing, I had debugged equinox earlier. Which had the 
> properties like osgi.framework path etc.
>
> Is there anything in felix which we need to configure?
>    

No, you should be able to create a framework instance without any
configuration necessary.

-> richard

>
>
> Thanks a lot for your help.
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Tuesday, February 23, 2010 12:05 PM
> To: users@felix.apache.org
> Subject: Re: Why do i need to put felix.jar in the path if jar file is 
> embeding felix?
>
> On 2/23/10 2:27 PM, Mahammad Nasir wrote:
>    
>> Both the cases I am instanciating same way.
>>
>> Like Felix new Felix(map)// map sets only systempackages.extra.
>>
>> Even equinox behaves the same way.
>>
>> I am using latest felix which supporp Factory.
>>
>>      
> I am still not really sure from your description what is going on. I 
> don't use Eclipse that much. I am not sure why putting felix.jar in 
> the application's working directory would have any impact whatsoever, 
> since that sounds like an IDE issue.
>
> The important part if you are using the FrameworkFactory approach is 
> for your lookup of the factory to succeed, the felix.jar must be on 
> your class path so it can be discovered.
>
> Is this something small you can send to me privately?
>
> ->  richard
>
>
>    
>> -----Original Message-----
>> From: Richard S. Hall [mailto:heavy@ungoverned.org]
>> Sent: Tuesday, February 23, 2010 11:51 AM
>> To: users@felix.apache.org
>> Subject: Re: Why do i need to put felix.jar in the path if jar file 
>> is embeding felix?
>>
>> On 2/23/10 2:02 PM, Mahammad Nasir wrote:
>>
>>      
>>> Hi..
>>>
>>> I have written a java application which launches felix. Here i have 
>>> set the external library and set the felix.jar. When i lauch the 
>>> application it works fine. i dint put the felix.jar in current dir 
>>> of the
>>>
>>>        
>> applicaiton.
>>
>>      
>>> It simply worked.It directly takes the jar from external library 
>>> path which i have configured in eclipse project proerties
>>>
>>> Now, I have witten a jar file which embeds felix. This jar file i am 
>>> loading in another java applcation. Now that i am trying to launch 
>>> this new application. It doesnt work. It  requires felix.jar to be 
>>> present in the current working dir of the application.
>>>
>>> Why this behavious is like this? Why this setup  is not taking the 
>>> felix.jar from the external library?
>>>
>>>
>>>        
>>      From your description, it is not really clear what is not working.
>>
>> How are you creating your framework instance?
>>
>> The Felix class doesn't really make any assumptions about its 
>> directory, but the default launcher does.
>>
>> ->   richard
>>
>>
>>      
>>> Regards
>>> Nasir
>>>
>>>
>>>
>>>
>>>
>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/23/10 2:56 PM, Mahammad Nasir wrote:
>
> If I don't put the felix.jar in application current dir, its not able to
> instantiate (or load the class).
>
> I canot send the current code as it is, But later I will try to create a
> similar example project.
>    

Ok. Still sounds like an IDE issue, perhaps you should try to get it 
working from the command line and see if it works as you would expect.

> I will spend some more time on it. May be I am doing some thing stupid!
>
> One more thing, I had debugged equinox earlier. Which had the properties
> like osgi.framework path etc.
>
> Is there anything in felix which we need to configure?
>    

No, you should be able to create a framework instance without any 
configuration necessary.

-> richard

>
>
> Thanks a lot for your help.
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Tuesday, February 23, 2010 12:05 PM
> To: users@felix.apache.org
> Subject: Re: Why do i need to put felix.jar in the path if jar file is
> embeding felix?
>
> On 2/23/10 2:27 PM, Mahammad Nasir wrote:
>    
>> Both the cases I am instanciating same way.
>>
>> Like Felix new Felix(map)// map sets only systempackages.extra.
>>
>> Even equinox behaves the same way.
>>
>> I am using latest felix which supporp Factory.
>>
>>      
> I am still not really sure from your description what is going on. I don't
> use Eclipse that much. I am not sure why putting felix.jar in the
> application's working directory would have any impact whatsoever, since that
> sounds like an IDE issue.
>
> The important part if you are using the FrameworkFactory approach is for
> your lookup of the factory to succeed, the felix.jar must be on your class
> path so it can be discovered.
>
> Is this something small you can send to me privately?
>
> ->  richard
>
>
>    
>> -----Original Message-----
>> From: Richard S. Hall [mailto:heavy@ungoverned.org]
>> Sent: Tuesday, February 23, 2010 11:51 AM
>> To: users@felix.apache.org
>> Subject: Re: Why do i need to put felix.jar in the path if jar file is
>> embeding felix?
>>
>> On 2/23/10 2:02 PM, Mahammad Nasir wrote:
>>
>>      
>>> Hi..
>>>
>>> I have written a java application which launches felix. Here i have
>>> set the external library and set the felix.jar. When i lauch the
>>> application it works fine. i dint put the felix.jar in current dir of
>>> the
>>>
>>>        
>> applicaiton.
>>
>>      
>>> It simply worked.It directly takes the jar from external library path
>>> which i have configured in eclipse project proerties
>>>
>>> Now, I have witten a jar file which embeds felix. This jar file i am
>>> loading in another java applcation. Now that i am trying to launch
>>> this new application. It doesnt work. It  requires felix.jar to be
>>> present in the current working dir of the application.
>>>
>>> Why this behavious is like this? Why this setup  is not taking the
>>> felix.jar from the external library?
>>>
>>>
>>>        
>>      From your description, it is not really clear what is not working.
>>
>> How are you creating your framework instance?
>>
>> The Felix class doesn't really make any assumptions about its
>> directory, but the default launcher does.
>>
>> ->   richard
>>
>>
>>      
>>> Regards
>>> Nasir
>>>
>>>
>>>
>>>
>>>
>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by Mahammad Nasir <ma...@huawei.com>.
 
If I don't put the felix.jar in application current dir, its not able to
instantiate (or load the class).

I canot send the current code as it is, But later I will try to create a
similar example project.

I will spend some more time on it. May be I am doing some thing stupid! 

One more thing, I had debugged equinox earlier. Which had the properties
like osgi.framework path etc. 

Is there anything in felix which we need to configure?



Thanks a lot for your help. 

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Tuesday, February 23, 2010 12:05 PM
To: users@felix.apache.org
Subject: Re: Why do i need to put felix.jar in the path if jar file is
embeding felix?

On 2/23/10 2:27 PM, Mahammad Nasir wrote:
> Both the cases I am instanciating same way.
>
> Like Felix new Felix(map)// map sets only systempackages.extra.
>
> Even equinox behaves the same way.
>
> I am using latest felix which supporp Factory.
>    

I am still not really sure from your description what is going on. I don't
use Eclipse that much. I am not sure why putting felix.jar in the
application's working directory would have any impact whatsoever, since that
sounds like an IDE issue.

The important part if you are using the FrameworkFactory approach is for
your lookup of the factory to succeed, the felix.jar must be on your class
path so it can be discovered.

Is this something small you can send to me privately?

-> richard


>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Tuesday, February 23, 2010 11:51 AM
> To: users@felix.apache.org
> Subject: Re: Why do i need to put felix.jar in the path if jar file is 
> embeding felix?
>
> On 2/23/10 2:02 PM, Mahammad Nasir wrote:
>    
>> Hi..
>>
>> I have written a java application which launches felix. Here i have 
>> set the external library and set the felix.jar. When i lauch the 
>> application it works fine. i dint put the felix.jar in current dir of 
>> the
>>      
> applicaiton.
>    
>> It simply worked.It directly takes the jar from external library path 
>> which i have configured in eclipse project proerties
>>
>> Now, I have witten a jar file which embeds felix. This jar file i am 
>> loading in another java applcation. Now that i am trying to launch 
>> this new application. It doesnt work. It  requires felix.jar to be 
>> present in the current working dir of the application.
>>
>> Why this behavious is like this? Why this setup  is not taking the 
>> felix.jar from the external library?
>>
>>      
>    From your description, it is not really clear what is not working.
>
> How are you creating your framework instance?
>
> The Felix class doesn't really make any assumptions about its 
> directory, but the default launcher does.
>
> ->  richard
>
>    
>> Regards
>> Nasir
>>
>>
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/23/10 2:27 PM, Mahammad Nasir wrote:
> Both the cases I am instanciating same way.
>
> Like Felix new Felix(map)// map sets only systempackages.extra.
>
> Even equinox behaves the same way.
>
> I am using latest felix which supporp Factory.
>    

I am still not really sure from your description what is going on. I 
don't use Eclipse that much. I am not sure why putting felix.jar in the 
application's working directory would have any impact whatsoever, since 
that sounds like an IDE issue.

The important part if you are using the FrameworkFactory approach is for 
your lookup of the factory to succeed, the felix.jar must be on your 
class path so it can be discovered.

Is this something small you can send to me privately?

-> richard


>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Tuesday, February 23, 2010 11:51 AM
> To: users@felix.apache.org
> Subject: Re: Why do i need to put felix.jar in the path if jar file is
> embeding felix?
>
> On 2/23/10 2:02 PM, Mahammad Nasir wrote:
>    
>> Hi..
>>
>> I have written a java application which launches felix. Here i have
>> set the external library and set the felix.jar. When i lauch the
>> application it works fine. i dint put the felix.jar in current dir of the
>>      
> applicaiton.
>    
>> It simply worked.It directly takes the jar from external library path
>> which i have configured in eclipse project proerties
>>
>> Now, I have witten a jar file which embeds felix. This jar file i am
>> loading in another java applcation. Now that i am trying to launch
>> this new application. It doesnt work. It  requires felix.jar to be
>> present in the current working dir of the application.
>>
>> Why this behavious is like this? Why this setup  is not taking the
>> felix.jar from the external library?
>>
>>      
>    From your description, it is not really clear what is not working.
>
> How are you creating your framework instance?
>
> The Felix class doesn't really make any assumptions about its directory, but
> the default launcher does.
>
> ->  richard
>
>    
>> Regards
>> Nasir
>>
>>
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by Mahammad Nasir <ma...@huawei.com>.
 


Both the cases I am instanciating same way.

Like Felix new Felix(map)// map sets only systempackages.extra.

Even equinox behaves the same way.

I am using latest felix which supporp Factory.


-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Tuesday, February 23, 2010 11:51 AM
To: users@felix.apache.org
Subject: Re: Why do i need to put felix.jar in the path if jar file is
embeding felix?

On 2/23/10 2:02 PM, Mahammad Nasir wrote:
> Hi..
>
> I have written a java application which launches felix. Here i have 
> set the external library and set the felix.jar. When i lauch the 
> application it works fine. i dint put the felix.jar in current dir of the
applicaiton.
> It simply worked.It directly takes the jar from external library path 
> which i have configured in eclipse project proerties
>
> Now, I have witten a jar file which embeds felix. This jar file i am 
> loading in another java applcation. Now that i am trying to launch 
> this new application. It doesnt work. It  requires felix.jar to be 
> present in the current working dir of the application.
>
> Why this behavious is like this? Why this setup  is not taking the 
> felix.jar from the external library?
>    

 From your description, it is not really clear what is not working.

How are you creating your framework instance?

The Felix class doesn't really make any assumptions about its directory, but
the default launcher does.

-> richard

>
> Regards
> Nasir
>
>
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Why do i need to put felix.jar in the path if jar file is embeding felix?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/23/10 2:02 PM, Mahammad Nasir wrote:
> Hi..
>
> I have written a java application which launches felix. Here i have set the
> external library and set the felix.jar. When i lauch the application it
> works fine. i dint put the felix.jar in current dir of the applicaiton.
> It simply worked.It directly takes the jar from external library path which
> i have configured in eclipse project proerties
>
> Now, I have witten a jar file which embeds felix. This jar file i am loading
> in another java applcation. Now that i am trying to launch this new
> application. It doesnt work. It  requires felix.jar to be present in the
> current working dir of the application.
>
> Why this behavious is like this? Why this setup  is not taking the felix.jar
> from the external library?
>    

 From your description, it is not really clear what is not working.

How are you creating your framework instance?

The Felix class doesn't really make any assumptions about its directory, 
but the default launcher does.

-> richard

>
> Regards
> Nasir
>
>
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org