The ebuild deletes lib/glassgtk2.* or lib/glassgtk3.* depending on the the gtk2 or gtk3 use flag. This seems to have worked for Java 8 but leads to problems with Java 9. The error message is "UnsatisfiedLinkError: no glassgtk2 in java.library.path". An environment variable "-Djdk.gtk.version=3" or "-Djdk.gtk.version=2" can be used to select the GTK version. JDK 9.04 works with the deleted file if the correct GTK version is set. I tried several Java environment variables and JAVA_TOOLS_OPTIONS=-Djdk.gtk.version=3 works with use flag gtk3. I suggest to not delete the files and just set the appropriate variable based upon the use flag.
That's unfortunate. I haven't had good experiences with setting variables like JAVA_TOOLS_OPTIONS in the past. On the other hand, leaving references to libraries that haven't been accounted for in the enabled dependencies can also confuse Portage. Do you have an example? I guess any JavaFX program will trigger it.
The rewritten control panel "jcontrol" triggers it as it seems to use JavaFX. FYI I found the property in this change: https://bugs.openjdk.java.net/browse/JDK-8087516
I also forgot to remove jcontrol when javafx is disabled. Just noting it here so I get that fixed too.
oracle-jdk-bin:9 was removed from the main tree. please use oracle-jdk-bin:11 or another available jdk.