Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 28866 invoked from network); 13 May 2007 20:17:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 May 2007 20:17:03 -0000 Received: (qmail 45897 invoked by uid 500); 13 May 2007 20:17:08 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 45869 invoked by uid 500); 13 May 2007 20:17:08 -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 45859 invoked by uid 99); 13 May 2007 20:17:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 May 2007 13:17:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of gcjhd-harmony-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 May 2007 13:17:00 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HnKUZ-0000hI-RQ for dev@harmony.apache.org; Sun, 13 May 2007 22:16:31 +0200 Received: from iswfwpr01.isw.intel.com ([192.55.37.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 May 2007 22:16:31 +0200 Received: from gshimansky by iswfwpr01.isw.intel.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 May 2007 22:16:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@harmony.apache.org From: Gregory Shimansky Subject: Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line Date: Mon, 14 May 2007 00:16:09 +0400 Lines: 80 Message-ID: References: <12410416.1164412082028.JavaMail.jira@brutus> <211709bc0704290125k4e3a376fo2c3f096d26a57888@mail.gmail.com> <5c8e69f0704290153i5b5ece8fyfd2b34938efa5b68@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: iswfwpr01.isw.intel.com User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) In-Reply-To: <5c8e69f0704290153i5b5ece8fyfd2b34938efa5b68@mail.gmail.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org LvJimmy,Jing wrote: > Agreed, it is strange that Harmony need correct java.home property to > execute as it is not necessary for RI. VM doesn't depend on java.home property, it depends on org.apache.harmony.boot.class.path to find bootstrap classes. As I wrote in the bug report, when bad java.home is specified, launcher fails to initialize org.apache.harmony.boot.class.path properly. > 2007/4/29, Tony Wu : >> Hi all, >> I agree with Gregory that this system is wrong, but I think the root >> cause is not in the launcher. If we ignore the java.home passed on cmd >> line in launcher and pass the executable path to vm as java.home, we >> have to set the property after vm has been created(this is one >> solution) otherwise we lose the feature to set this property.(RI could >> print correct (System.getProperty("java.home")) in this case) >> >> IMO, VM should not depend on the system property "java.home" to load >> its own libraries. So, another solution is, pass executable path to vm >> in another manner instead of using java.home. >> >> I'm not sure that which one is better, what's your opinion and do you >> have any suggestion on this problem? >> > > Either is OK IMHO, just behave as RI does. > >> On 11/25/06, Gregory Shimansky (JIRA) wrote: >> > [classlib] Launcher fails to find properties location when bad >> -Djava.home is specified on the command line >> > >> ----------------------------------------------------------------------------------------------------------- >> >> > >> > Key: HARMONY-2321 >> > URL: http://issues.apache.org/jira/browse/HARMONY-2321 >> > Project: Harmony >> > Issue Type: Bug >> > Components: Classlib >> > Environment: All >> > Reporter: Gregory Shimansky >> > >> > >> > A short investigation shows that launcher parses -Djava.home passed >> on the command line. Later on while classlib is initialized the >> function readClassPathFromPropertiesFile calls properties_load with >> file name formed as ${java.home}/lib/boot/bootclasspath.properties. If >> this file is not found and properties_load, then no value is assigned >> to org.apache.harmony.boot.class.path. >> > >> > I think this system is wrong. The launcher should not pay attention >> to java.home passed on the command line. The location should be found >> from the executable path probably. RI doesn't crash or fail its boot >> classes when I specify bad -Djava.home on the command line. >> > >> > >> > -- >> > This message is automatically generated by JIRA. >> > - >> > If you think it was sent incorrectly contact one of the >> administrators: http://issues.apache.org/jira/secure/Administrators.jspa >> > - >> > For more information on JIRA, see: >> http://www.atlassian.com/software/jira >> > >> > >> > >> >> >> -- >> Tony Wu >> China Software Development Lab, IBM >> > > -- Gregory