The upgrade to Lucene 9.12.3 in XWIKI-21954 fixes it: the MMapDirectory.lookupProvider warning is not displayed anymore when starting XWiki on Java 25 (verified with a build of the XWIKI-21954 branch).
Note that Lucene 9.12.3 displays another, similar warning on Java 23 or later, coming from its vectorization support: You are running with Java 23 or later. To make full use of the Vector API, please update Apache Lucene. Lucene 9.12 being the last 9.x version, that one will only go away with Lucene 10 (i.e. Solr 10).
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.