You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2006/11/25 00:48:02 UTC
[jira] Created: (HARMONY-2321) [classlib] Launcher fails to find
properties location when bad -Djava.home is specified on the command line
[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
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find
properties location when bad -Djava.home is specified on the command line
Posted by Gregory Shimansky <gs...@apache.org>.
Tony Wu wrote:
> On 5/14/07, Gregory Shimansky <gs...@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.
I see what you mean now. Looking at the code in
readClassPathFromPropertiesFile I see exactly what I wrote in the JIRA.
Launcher uses java.home value to find the properties file location.
Changing java.home to hy.home won't change anything except for the
property name in the bug, the user would still be able to break
initialization by specifying some bad value of hy.home property.
>> > On 5/14/07, Gregory Shimansky <gs...@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 <wu...@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) <ji...@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
>>
>>
>
>
--
Gregory
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line
Posted by Tony Wu <wu...@gmail.com>.
On 5/14/07, Gregory Shimansky <gs...@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 <gs...@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 <wu...@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) <ji...@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
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find
properties location when bad -Djava.home is specified on the command line
Posted by Gregory Shimansky <gs...@apache.org>.
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.
> On 5/14/07, Gregory Shimansky <gs...@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 <wu...@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) <ji...@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
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line
Posted by Tony Wu <wu...@gmail.com>.
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.
On 5/14/07, Gregory Shimansky <gs...@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 <wu...@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) <ji...@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
>
>
--
Tony Wu
China Software Development Lab, IBM
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find
properties location when bad -Djava.home is specified on the command line
Posted by Gregory Shimansky <gs...@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 <wu...@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) <ji...@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
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line
Posted by LvJimmy,Jing <fi...@gmail.com>.
Agreed, it is strange that Harmony need correct java.home property to
execute as it is not necessary for RI.
2007/4/29, Tony Wu <wu...@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) <ji...@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
>
--
Best Regards!
Jimmy, Jing Lv
China Software Development Lab, IBM
Re: [jira] Created: (HARMONY-2321) [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line
Posted by Tony Wu <wu...@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?
On 11/25/06, Gregory Shimansky (JIRA) <ji...@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
[jira] Commented: (HARMONY-2321) [classlib][launcher] Launcher
fails to find properties location when bad -Djava.home is specified on the
command line
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494024 ]
Alexey Varlamov commented on HARMONY-2321:
------------------------------------------
The current design supports modularity in a nice way and I don't we need to alter the main idea, but fix particular impl flaws.
Most simple solution is to use more specific property name for jvm location, like "org.apache.harmony.home".
More robust solution would be to introduce concept of categories of properties (user vs system) in VMI, as it is done in DRLVM impl. BTW, cmd-line syntax of RI implies such separation, too (-D vs -XX:). Then launcher should setup java.home as a system property and luni natives should use the system property value (as opposite to current user property) for bootclasspath calculation.
> [classlib][launcher] Launcher fails to find properties location when bad -Djava.home is specified on the command line
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2321
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2321) [classlib][launcher] Launcher fails
to find properties location when bad -Djava.home is specified on the
command line
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko updated HARMONY-2321:
-------------------------------------
Summary: [classlib][launcher] Launcher fails to find properties location when bad -Djava.home is specified on the command line (was: [classlib] Launcher fails to find properties location when bad -Djava.home is specified on the command line)
> [classlib][launcher] Launcher fails to find properties location when bad -Djava.home is specified on the command line
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2321
> URL: https://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.
-
You can reply to this email to add a comment to the issue online.