Moved JAVA_OPTS to global environment to fix build matrix.