Hi, I started to look into Solr. In fact after some fruitful discussions with the Jigsaw people I figured out what the "main" issue is.
Also for Solr we should put AccessibleObject#setAccessible() onto the forbidden-apis list and only allow it for some very special cases (which are also supported by Oracle): The MMapDir cleaner. Any comments?
Solr has some violations on this, because it tries to make hidden fields or methods available that are part of the Java runtime. With Java 9 Jigsaw (soon to be merged into Java 9 mainline), any call to setAccessible() on any class which is part of the Java runtime fails. PERIOD. No way to work around that. There are only some "exceptions" for some APIs (see JEP 260), but the general rule holds. If you try to make one of the internal members accessible, setAccessible throws a new RuntimeException. This lead to some discussions (e.g. the Groovy runtime engine is completely broken by that, see
GROOVY-7587). Oracle is working on solutions for that, but the general rule holds: http://mail.openjdk.java.net/pipermail/jigsaw-dev/2015-September/004530.html
I will now fix some issues in Solr. One of those is the SystemInfoHandler. This just uses the OperatingSystemMXBean in a "wrong way", because it tries to call hidden methods, which are only implemented by an interface. So it fails. You just need to cast to correct interface and then you can call the methods as usual. I will commit this fix in a minute.