From dev-return-37274-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Tue May 19 01:49:15 2009 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 91295 invoked from network); 19 May 2009 01:49:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 May 2009 01:49:15 -0000 Received: (qmail 39754 invoked by uid 500); 19 May 2009 01:49:14 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 39675 invoked by uid 500); 19 May 2009 01:49:14 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 39664 invoked by uid 99); 19 May 2009 01:49:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 01:49:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xiaofeng.li@gmail.com designates 209.85.221.106 as permitted sender) Received: from [209.85.221.106] (HELO mail-qy0-f106.google.com) (209.85.221.106) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2009 01:49:05 +0000 Received: by qyk4 with SMTP id 4so6268694qyk.20 for ; Mon, 18 May 2009 18:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=jbPH0oGMbg0r68z5xvQb+JJxNHfRfHscjPBLc2E6FNE=; b=aJD1pMtCusH1FZ7OysBln/ANnxZv4X4n721/DyhBMu3zUw5R56PaeOuznQq51Md1Id zQHBFOJoAS6ZKoPYo5O4zY3wHyjYL0jv5mf8hrQKu9oJ5KKW270SIctQ6tZbhTlu4DhS 4YrwDJPleG+X7gju28dv2RT7LDqXZ0tCHK5h0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=dGtEEE0i5AIfnGyvgFX1c7R1svnyIsKDW2s42Jd36OW0YkiVZjTYU+zyFa1S6HzCCw +LnuFvDdimiaMHXesV8Xkl29xNBqmTBhZNFLm1qGBMglNJAl5GbVOWxCaciWQSo/pl9J at1/kOQJocOmxmMCFmigqrsTteCM/+S+6+7cU= MIME-Version: 1.0 Received: by 10.229.99.210 with SMTP id v18mr3217239qcn.34.1242697724822; Mon, 18 May 2009 18:48:44 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 May 2009 09:48:44 +0800 Message-ID: <9623c9a50905181848v26dc95f5x5bebd3365aa90230@mail.gmail.com> Subject: Re: Question about the boot and classloading From: Xiao-Feng Li To: dev@harmony.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, May 18, 2009 at 8:37 PM, tian galaxy wro= te: > 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 cl= ass > 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 > >> Short answer is "no". You'll have to implement osgi loading model >> inside bootstrap classloader. Is it too complex? >> >> 2009/5/18, tian galaxy : >> > 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 =A0bootstrap 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 runt= ime >> to >> > be osgi-ed. >> > I trying to work on this problem . Do you have any suggestions ? >> > >> > >> > 2009/5/18 Pavel Pervov >> > >> >> 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 : >> >> > 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 wor= ks >> >> 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 > --=20 http://people.apache.org/~xli