Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 43494 invoked from network); 20 Oct 2006 10:13:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 10:13:43 -0000 Received: (qmail 64784 invoked by uid 500); 20 Oct 2006 10:13:40 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 64747 invoked by uid 500); 20 Oct 2006 10:13:40 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 64736 invoked by uid 99); 20 Oct 2006 10:13:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 03:13:40 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of pmcfirst@gmail.com designates 64.233.166.180 as permitted sender) Received: from [64.233.166.180] (HELO py-out-1112.google.com) (64.233.166.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 03:13:37 -0700 Received: by py-out-1112.google.com with SMTP id c30so114338pyc for ; Fri, 20 Oct 2006 03:13:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=B36sXV4SLB+lP+CGiMYEv2nB0Nwj6afwTCxFmhePnfgsgkhYdBvIrWIAQ5zEdsvla7MKlwdmYpgR9nNlnSr6HnTCYO53xYOvR1foB7pp8zLo9fFEa0r4qo96moXfX+P8UKrV2qoNGIYJ12XmoHZCmsivhp+jT/AYgMNgp1a6KQE= Received: by 10.35.12.13 with SMTP id p13mr292966pyi; Fri, 20 Oct 2006 02:45:07 -0700 (PDT) Received: by 10.35.9.7 with HTTP; Fri, 20 Oct 2006 02:45:07 -0700 (PDT) Message-ID: Date: Fri, 20 Oct 2006 13:45:07 +0400 From: "Pavel Pervov" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] Using JNI methods in VM's components. In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13511_7173385.1161337507710" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13511_7173385.1161337507710 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Mikhail, You certainly can. Just add System.loadLibrary() to the static initialization block of a class, which declares that method and call for such class. Example. ---------------------- Component: gcv5.dll Class, implementing fast path magics: GCv5Magics Class source: class GCv5Magics { static { System.loadLibrary("gcv5.dll"); } // ... the rest of magics for GC v5 } Regards, Pavel. P.S. is not called for such classes now, but magics are all something new to add to VM. On 10/20/06, Mikhail Fursov wrote: > > All, > AFAIK today I can't add JNI method to a component (em library, gc library, > jit library) and call the method from Java. > Is there any reason why do we have this limitation? > > I have only the one, but IMO very serious reason why to allow it: a part > of > a component could be written in Java. > > The example is EMThreadSupport.java class. This class is a part of the > kernel classes but this is wrong. > I can't extend its functionality without modification of VM-EM native > interface. > ? > > -- > Mikhail Fursov > > ------=_Part_13511_7173385.1161337507710--