RFR: Export InitializeEncoding for JVM access

Roger Riggs Roger.Riggs at Oracle.com
Fri Apr 6 14:39:07 UTC 2018

Hi Andrew,

Would it be sufficient to export the InitializeEncoding entry point?

Introducing a JNU_xx name may imply a level of support that is 
unwarranted since
it is part of system initialization and may change as needed by the 
Simply exporting it would put it on par with Canonicalize.

Thanks, Roger

p.s. Tracking issue: https://bugs.openjdk.java.net/browse/JDK-8201246

On 4/5/2018 5:49 AM, Andrew Leonard wrote:
> Hi Roger,
> The OpenJ9 VM implementation provides its own java.lang.System, which 
> performs similar type early-on VM initialization to the OpenJDK core 
> library classes. The basic reason for invoking the method is to 
> initialize the platform encoding either called from a related core 
> library method, eg.initProperties(), or from the VM in the early 
> stages of initialization.
> My suggested comparison with canonicalize was based on it's indicated 
> usage:
> /*
>  * Export the platform dependent path canonicalization so that
>  * VM can find it when loading system classes.
>  * This function is also used by the instrumentation agent.
>  */
> extern int canonicalize(char *path, const char *out, int len);
> Canonicalize(JNIEnv *unused, char *orig, char *out, int len)
> {
> /* canonicalize an already natived path */
> return canonicalize(orig, out, len);
> }
> Many thanks,
> Andrew
> Andrew Leonard
> Java Runtimes Development
> IBM Hursley
> IBM United Kingdom Ltd
> Phone internal: 245913, external: 01962 815913
> internet email: andrew_m_leonard at uk.ibm.com
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with 
> number 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

More information about the core-libs-dev mailing list