Accessing UNIX FileDescriptor id without reflection

Enrico Olivelli eolivelli at
Mon May 8 13:16:24 UTC 2017

I am trying to port a project (Apache BookKeeper) to Java9, actually
this code uses reflection in order to access the 'fd' field of the
FileDescriptor class.

We have to access that ID in order to call low level native functions

# getSysFileDescriptor

Is there any way to access the FD handle without using reflecttion ?
If not, is it possibile to enhance the FileDescriptor API in order to
given access to the internal "fd" field ?

Thank you

Enrico Olivelli

More information about the core-libs-dev mailing list