You can get the inode number with java SE APIs, but not in the way that's necessary to gain performance. On linux you want it during directory iteration from the getdents syscall because that doesn't require opening the file or even grabbing its metadata, just reading the directory entries is enough.
If you obtain the inode number by fetching the metadata you're already accessing the inode, defeating a part of the optimization.
Maybe there are libraries that will do that. Or if not, project panama will make it easier to just call the relevant libc function.