I'm attempting to install and test apache-flink 1.5.0 on macOS using Homebrew.
The test step runs flink's `start-scala-shell.sh` to exercise the package. When I do this, it issues some warnings about log4j and reflective access, and then hangs.
$ brew test apache-flink
==> /usr/local/Cellar/apache-flink/1.5.0/libexec/bin/start-scala-shell.sh local
Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=/tmp/apache-flink-test-20180526-20068-19gl4zf -Duser.home=/Users/janke/Library/Caches/Homebrew/java_cache
log4j:WARN No appenders could be found for logger (org.apache.flink.configuration.GlobalConfiguration).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.flink.core.memory.HybridMemorySegment (file:/usr/local/Cellar/apache-flink/1.5.0/libexec/lib/flink-dist_2.11-1.5.0.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.flink.core.memory.HybridMemorySegment
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
The log4j warnings just mean that log4j hasn't been initialized; no big deal.
The "Illegal reflective access" warnings look like the warnings you see when running Java 8-only software under Java 9 or Java 10.
This happens even when I set `JAVA_HOME` to point at my JDK 8 installation.
I suspect this is because the `start-scala-shell.sh` script calls plain `java` instead of using the `$JAVA_RUN` variable set in flink's `config.sh`, which it called earlier, and which seems to respect `$JAVA_HOME`. From `start-scala-shell.sh`:
java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
java -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@
Should `start-scala-shell.sh` be changed to use `$JAVA_HOME` like the other scripts in `libexec`?