Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 78071 invoked from network); 10 Oct 2006 16:01:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 16:01:08 -0000 Received: (qmail 93010 invoked by uid 500); 10 Oct 2006 16:01:05 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 92981 invoked by uid 500); 10 Oct 2006 16:01:05 -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 92970 invoked by uid 99); 10 Oct 2006 16:01:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:01:05 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 216.86.168.178 is neither permitted nor denied by domain of geir@pobox.com) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:01:03 -0700 Received: from [172.27.172.229] (unknown [66.194.95.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 5E22A53414 for ; Tue, 10 Oct 2006 12:00:40 -0400 (EDT) Message-ID: <452BC3AD.5040302@pobox.com> Date: Tue, 10 Oct 2006 12:00:45 -0400 From: "Geir Magnusson Jr." Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] VM throws NullPointerException in case java.class.path is not set References: <452B7899.7060103@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Absolutely. And if not, even the principle of "be kind to your users" dictates that we do something nice for them. geir Evgueni Brevnov wrote: > Oliver, > > You have provided strong arguments that RI uses current directory by > default. I think it makes sense to be compatible with RI in this > particular case. > > Thanks > Evgueni > > On 10/10/06, Oliver Deakin wrote: >> I have just tried launching the RI with a simple launcher (very basic - >> CreateJavaVM(), >> finds and launches a class, then calls DestroyJavaVM()). The launcher >> does not >> set java.class.path, and executes the main method of the following class: >> >> public class SysInfo { >> public static void main(String[] args) { >> System.getProperties().list(System.out); >> } >> } >> >> The java.class.path value is printed as: >> >> java.class.path= >> >> So it appears that java.class.path property is left empty by default. >> However, >> to have found the SysInfo class, the RI must have searched in the current >> directory. I can also instantiate other classes that are located in the >> current >> directory. So although the java.class.path is set to an empty string, >> internally >> there is a default inclusion of the current directory. >> >> IMHO we follow the RI behaviour here, and have an implicit inclusion of >> the current directory unless the classpath is explicitly set. >> >> Regards, >> Oliver >> >> >> Evgueni Brevnov wrote: >> > It seems for me like pretty specified VM behavior to treat classpath >> > absence as take classes from current directory. At least RI does like >> > that when you don't specify classpath on command line. >> > >> > Evgueni >> > >> > On 10/10/06, Mikhail Fursov wrote: >> >> Another solution could be a simple shutdown with the valid error >> >> message. >> >> Sometimes the error message is better than hidden behaviour. >> >> So the alternative is to check all properties VM needs before running >> >> real >> >> startup and fail if some of the properties are not found. >> >> >> >> >> >> On 10/10/06, Evgueni Brevnov wrote: >> >> > >> >> > Hi All, >> >> > >> >> > Currently DRLVM starts with help of the launcher. The launcher >> does a >> >> > lot of stuff required to create VM instatnce. As a part of its >> job it >> >> > sets up java.class.path property. And this is good. What is not good >> >> > that DRLVM crashes (actually throws NullPointerException in >> >> > initalization stage) if java.class.path is not set. I believe it >> makes >> >> > sense to point java.class.path to current directory inside VM if >> >> > launcher doesn't set it. >> >> > >> >> > What do u think? >> >> > >> >> > Thanks >> >> > Evgueni >> >> > >> >> > >> --------------------------------------------------------------------- >> >> > 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 >> >> > >> >> > >> >> >> >> >> >> -- >> >> Mikhail Fursov >> >> >> >> >> > >> > --------------------------------------------------------------------- >> > 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 >> > >> > >> >> -- >> Oliver Deakin >> IBM United Kingdom Limited >> >> >> --------------------------------------------------------------------- >> 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