harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Regis <xu.re...@gmail.com>
Subject Re: Question about the boot and classloading
Date Tue, 19 May 2009 07:29:27 GMT
I don't know how osgi works, I think it's better if this osgi-ed kernel is 
transparent to Java applications. From Java applications, the classloader 
hierarchy is not changed, so all the existed applications could run on osgi-ed 
kernel smoothly.

tian galaxy wrote:
> Thanks Li I think you are right .The ready environment is important and acts
> as  the basis for running programs .
> Your understanding also inspired me that if there is a environment ,there
> must be a boundary .
> So what I want to do is equivalent to determine the
> environment's boundary and manage the rest .
> Some thing like [1]
> Actually the design is straight .I think what I really need to concern is to
> figure out how to define boundary and
> moving some of the former system classes outside of the boundary.
> Am I correct on this ?Do you have any useful tips on this problem?Your
> suggestion will be precious for me .
> Thanks
> 
> [1]
> Fundamental System classes (bootstrap loader)(the minimum request for osgi)
>                                   |
>                                   |
>                             OSGi Implementation
>                                   |
>                                   |
> ______________________________________
> |                           |                           |
> |                           |                           |
> Other System Classes Modules    User Program  .....
> 
> 
> 
> 2009/5/19 Xiao-Feng Li <xiaofeng.li@gmail.com>
> 
>> On Mon, May 18, 2009 at 8:37 PM, tian galaxy <harmonymail.ty@gmail.com>
>> wrote:
>>> Yes , implement osgi loading model in there is too complex.
>>>
>>> We know some modules are more important than others , performing some
>>> fundamental , basic functions .
>>> Is it possible to only load these more" basic " modules with bootstrap
>> class
>>> loader and make the other modules work the osgi bundle?
>>> Actually I don't quite understand why system classes could only be loaded
>> by
>>> bootstrap class loader?I noticed that there are some safety concerns
>>> ,is there any reasons other than that?
>> In my understanding, the reason is the system has to have a "ready
>> environment" for Java domain to stand. For example, every class is
>> described by j.l.Class, which should be described by itself; and every
>> type is a sub(..)class of j.l.Object, which is a subclass of itself.
>> So the system has to load those classes before it knows what is
>> j.l.Class and j.l.Object. The same logic applies to those primitive
>> data types, some data structures that describe the data structures,
>> etc. Finally you probably need to load other class loader with the
>> bootstrap loader before you can use the other class loader. :)
>>
>> Thanks,
>> xiaofeng
>>
>>> Thanks !
>>>
>>>
>>> 2009/5/18 Pavel Pervov <pmcfirst@gmail.com>
>>>
>>>> Short answer is "no". You'll have to implement osgi loading model
>>>> inside bootstrap classloader. Is it too complex?
>>>>
>>>> 2009/5/18, tian galaxy <harmonymail.ty@gmail.com>:
>>>>> Hi Pavel.
>>>>>
>>>>> Thanks.
>>>>> Yes ,that's right .My question is whether there is a way to load the
>>>> system
>>>>> class by class loader other than the  bootstrap class loader ?
>>>>> If we could load the system class by different loaders other than the
>>>>> bootstrap class loader then there is a chance to make the harmony
>> runtime
>>>> to
>>>>> be osgi-ed.
>>>>> I trying to work on this problem . Do you have any suggestions ?
>>>>>
>>>>>
>>>>> 2009/5/18 Pavel Pervov <pmcfirst@gmail.com>
>>>>>
>>>>>> Tian,
>>>>>> System classes are all loaded with bootstrap classloader. It is
>>>>>> written in C++ and is located in
>>>>>> working_vm/vm/vmcore/src/class_support/classloader.cpp
>>>>>>
>>>>>> 2009/5/17, tian galaxy <harmonymail.ty@gmail.com>:
>>>>>>> Hi all
>>>>>>> I have a question about the classloading in the drlvm.
>>>>>>>
>>>>>>> I know that there are kernel library inside the drlvm such as
>>>>>>> java.lang.classloader, which enclose the the systemclassloader.
And
>>>> this
>>>>>>> class is loaded and used in the process of creating VM .
>>>>>>> While the systemclassloader is a subtype of urlclassloader which
is
>> in
>>>>>> the
>>>>>>> "luni" module.So does the JNI_CreateJavaVM
>>>>>>> also load the urlclassloader in the boot procedure of vm ?(I
failed
>> to
>>>>>>> search related code in the source code of drlvm).
>>>>>>> If so , when ?Before or after the jni available ?
>>>>>>> Since I am trying to implement the osgi on harmony and the osgi
>> works
>>>>>> with
>>>>>>> bundles (modules) , I think I need to know the procedure of booting
>>>> and
>>>>>>> loading of class from different modules at the start up time.
>>>>>>> Any clue about this ?Thanks
>>>>>>>
>>>>>>> plus,do we have the source code of java.exe ?Where?
>>>>>>>
>>>>>>> --
>>>>>>> Regards
>>>>>>> Michael Tian
>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards
>>>>> Michael Tian
>>>>>
>>>
>>>
>>> --
>>> Regards
>>> Michael Tian
>>>
>>
>>
>> --
>> http://people.apache.org/~xli
>>
> 
> 
> 


-- 
Best Regards,
Regis.

Mime
View raw message