[PATCH] aarch32: JNI layer to initialize native nio constants

Alexey Bakhtin alexey at azul.com
Thu May 5 14:41:06 UTC 2016


Hi, 

In case of cross compilation the host generates sun.nio.fs.UnixConstants class with the native nio constants from the host machine. The value of these constants (e.g. O_NOFOLLOW) could be different on the host and target devices. It causes wrong behaviour of the NIO File functionality.

This issue is described in https://bugs.openjdk.java.net/browse/JDK-8152545 and fixed in OpenJDK9 with Jigsaw. However it is not applicable for JDK8.
This issue could be fixed by adding JNI layer to initialize sun.nio.fs.UnixConstants class on the target device:
http://cr.openjdk.java.net/~snazarki/UnixConstants.diff


This issue could be reproduced and verified with the standard JDK tests:

1) java/nio/file/Files/delete_on_close.sh
2) java/nio/file/Files/SBC.java

Thank you
Alexey


More information about the aarch32-port-dev mailing list