harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu" <wuyue...@gmail.com>
Subject Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line
Date Tue, 15 May 2007 03:45:05 GMT
On 5/14/07, Gregory Shimansky <gshimansky@apache.org> wrote:
> Tony Wu wrote:
> > hmm, my opinion is set up another property pointing to the excuteable
> > path, e.g. hy.home. then craft the org.apache.harmony.boot.class.path
> > by hy.home rather than java.home.
>
> This approach is possible as well. In fact hy.home would be used only
> inside of the launcher so there is no need to create it as a full
> property I think. Launcher should just calculate its value to make
> correct org.apache.harmony.boot.class.path for VM.
>
AFAIU org.apache.harmony.boot.class.path is crafted by vm rather than
launcher via VMI call, refer to the method
readClassPathFromPropertiesFile in luniglob.c. maybe we have to set
hy.home. There is no restrict for extra properties according to spec.
I believe it does no harm.

> > On 5/14/07, Gregory Shimansky <gshimansky@apache.org> wrote:
> >> 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 <wuyuehao@gmail.com>:
> >> >> 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) <jira@apache.org> 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
> >>
> >>
> >
> >
>
>
> --
> Gregory
>
>


-- 
Tony Wu
China Software Development Lab, IBM

Mime
View raw message