Review request 8145409: Better detect JRE that JLI will be using
Kumar Srinivasan
kumar.x.srinivasan at oracle.com
Wed Jan 13 14:48:54 UTC 2016
Hi Dmitry,
Approved. Please make sure all the core tests are run using jprt
and integrate this into jdk9/dev, if you can't do so, let me know.
Thanks
Kumar
On 1/13/2016 4:06 AM, Dmitry Cherepanov wrote:
> Hi Kumar,
>
> Thanks for the comments.
>
> On 1/12/16 9:21 PM, Kumar Srinivasan wrote:
>>
>> Hi Dmitry,
>>
>> src/java.base/windows/native/libjli/java_md.c
>>
>> 1) use NULL
>>
>> - GetModuleFileName(0, buf, bufsize);
>>
>> + GetModuleFileName(NULL, buf, bufsize);
> OK.
>>
>>
>> 2) extra LF ?
>>
>> + * Removes the trailing file name and one sub-folder from a path.
>> + *
>> + * If buf is "c:\foo\bin\javac", then put "c:\foo" into buf.
>>
>> and
>>
>> + return TruncatePath(buf);
>> +}
>> +
>> +
>> +/*
> Fixed.
>
>>
>>
>> 3) Is this comment correct ?
>>
>> /*
>> + * Retrieves the path to the executable file of the current process
>> + * and then truncates the path
>> + */
>>
>> Shouldn't it say Retrieves the path the JRE home by locating the
>> executable of
>> the current process ........
> Fixed too.
>>
>>
>> 4) Could you please add some comments to GetApplicationHomeFromAddress ?
>> Shouldn't the method be called GetApplicationHomeFromDll ?
> Good idea. I've updated the name and comments.
>
>>
>> + GetModuleHandleEx(dwFlags, (LPCSTR)&GetJREPath, &hModule);
>>
>> shouldn't you be testing the return value for success ?
> Fixed.
>
> Updated webrev:
> http://cr.openjdk.java.net/~dcherepanov/8145409/webrev.v1/
>
> Thanks
> Dmitry
>
More information about the core-libs-dev
mailing list