Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 45926 invoked from network); 11 Sep 2006 10:29:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 10:29:51 -0000 Received: (qmail 21749 invoked by uid 500); 11 Sep 2006 10:29:49 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 21352 invoked by uid 500); 11 Sep 2006 10:29:48 -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 21339 invoked by uid 99); 11 Sep 2006 10:29:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 03:29:48 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of evgueni.brevnov@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 03:29:47 -0700 Received: by wx-out-0506.google.com with SMTP id s13so1537900wxc for ; Mon, 11 Sep 2006 03:29:26 -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:content-transfer-encoding:content-disposition:references; b=WcKxZQbpxoK0o/AgOR2ZFvBfsQkqxRCERSkWOIuagk24Tcev5qmSUeuDagbtHsXaI1NLolMic12YupI0WenF7sJIvtqlrivGOPxWQedGDyeFdILKfMtF3KSWM/qVWol31kszdrlJPYamxCcqHVgRhcndGkAfwNw8Q8/giN7NN4o= Received: by 10.90.54.20 with SMTP id c20mr1437213aga; Mon, 11 Sep 2006 03:29:26 -0700 (PDT) Received: by 10.90.63.14 with HTTP; Mon, 11 Sep 2006 03:29:26 -0700 (PDT) Message-ID: Date: Mon, 11 Sep 2006 17:29:26 +0700 From: "Evgueni Brevnov" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] putting kernel.jar in jre/bin/default In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4501E183.2010902@pobox.com> <4501EE87.9090508@pobox.com> <4504E4F2.6010200@pobox.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 9/11/06, Alexey Varlamov wrote: > 2006/9/11, Evgueni Brevnov : > > On 9/11/06, Alexey Varlamov wrote: > > > 2006/9/11, Geir Magnusson Jr. : > > > > > > > > > > > > Evgueni Brevnov wrote: > > > > > On 9/9/06, Geir Magnusson Jr. wrote: > > > > >> There seems to be no easy solution, other than parse LD_LIBRARY_PATH or > > > > >> PATH... > > > > > > > > > > Is vmcore.dll (now harmonyvm.dll) and kernel.jar should always reside > > > > > in one directory? > > > > > > > > I was thinking about this for packaging - that way you can have : > > > > > > > > jre/ > > > > bin/ > > > > j9/ > > > > drlvm/ > > > > > > > > and setup a symlink if you wish. > > > > > > > > if we have kernel.jar in jre/lib/boot as we do now, it's must less > > > > convenient and probably error prone to switch back and forth. > > > > > > > > > If yes then we can take vmcore.dll base path as a > > > > > location of kerenel.jar. > > > > > > > > Sure - where will you get that? and what do you w/ .so's in unix? I've > > > > come to the conclusion that the only way will be to manually run the > > > > PATH (win) and LD_LIBRARY_PATH (linux) > > > > > Geir, it seems you are right. I failed to find appropriate solution on > > Linux. Parsing LD_LIBRARY_PATH can be an option here. Or we can use > > deployment process to set up application specific environment > > variable. > > Well, with a bit of googling I've managed to obtain the following snippet [1]: > if (dladdr( addr, &info ) != 0) > { > strncpy( path, info.dli_fname, PATH_MAX ); > *(strrchr( path, '/' )) = '\0'; > } > > "The dladdr() function shall query the dynamic linker for information > about the shared object containing the address addr." [2] > Moreover, google reports about "dladdr" in a variety of manuals, > including BSD, SGI, MacOS, Solaris etc, I've listed some of the links > below. > So this looks like a silver bullet for us :) Great! It should work for us. With this approach it is possible not to depend on LD_LIBRARY_PATH and PATH at all. > > [1] http://lists.trolltech.com/qt-interest/2003-11/msg00380.html > [2] http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/baselib-dladdr-3.html > [3] http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/dladdr.3.html > [4] http://docs.sun.com/app/docs/doc/816-5168/6mbb3hr4c?a=view > > > > > > IIUC, j9 does this in astonishingly simple way - it just specifies > > > "-Xbootclasspath/p:%LAUNCHER_HOME%/default/luni-kernel.jar" in the > > > "/harmonyvm.properties" file, and the launcher does the rest. > > > Namely, it automatically reads that file, replaces %LAUNCHER_HOME% > > > with actual location and feeds extra arguments to VM among user's > > > ones. > > > This solution looks sufficient for now, but it seems to be only > > > partial: it does not work for pure Invocation API usecase. Besides, > > > those hardcoded arguments to VM appear confusing in some cases - e.g. > > > it is impossible to override kernel.jar via command-line. Also note > > > hardcoded "default" vmdir. > > > > > > As for the .so locations, I'm not sure if there is portable solution > > > (parsing LD_LIBRARY_PATH looks error-prone). Maybe better solution > > > would be leave this to user - for setting JAVA_HOME or such... > > > > > > -- > > > Alexey > > > > > > > > > > > geir > > > > > > > > > > > > > > > > > > >> > > > > >> geir > > > > >> > > > > >> Geir Magnusson Jr. wrote: > > > > >> > I'll figure this out myself if I don't get a quick answer, but I think > > > > >> > we should put the DRLVM kernel classes jar(s) in the same directory as > > > > >> > the rest of the DRLVM artifacts so that it's easy to switch between VMs > > > > >> > using the launcher. (J9 does this). > > > > >> > > > > > >> > How does DRLVM decide where to look? > > > > >> > > > > > >> > (I'm re-doing the DRLVM build to finish integrating the launcher > > > > >> > properly, and figure that a nice thing to add is a DRLVM-snapshot that > > > > >> > just drops into classlib/deploy/jdk/jre/bin the same way J9 does for > > > > >> > developers.... > > > > >> > > > > > >> > geir > > > > >> > > > > > >> > --------------------------------------------------------------------- > > > > >> > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > >> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > > > >> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > >> > > > > > >> > > > > >> --------------------------------------------------------------------- > > > > >> Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > > > >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > >> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > > > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org