How do I update java manual pages with Homebrew?
I have a solution, but if anyone finds a simpler solution, then I will accept it. Here is mine.
Remember, I am using fish.
~/.config/fish/functions/java8.fish
function java8
    if set --local idx (contains --index -- $JAVA_HOME $fish_user_paths)
        # Remove other JAVA_HOME from path
        # Otherwise it will take priority
       set --erase fish_user_paths[$idx]
    end

    set --export JAVA_HOME /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

    # We do not need JAVA_HOME on the path for the executables
    # We need it for the man pages, so man will search $JAVA_HOME/man
    # If we add $JAVA_HOME/bin to the path, then man erroneously searches $JAVA_HOME/bin/man
    set fish_user_paths $fish_user_paths $JAVA_HOME
end

I copied and adjusted this script for Java 11 (abbreviated):
~/.config/fish/functions/java11.fish
function java11
    if set --local idx (contains --index -- $JAVA_HOME $fish_user_paths)
       set --erase fish_user_paths[$idx]
    end
    set --export JAVA_HOME /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
    set fish_user_paths $fish_user_paths $JAVA_HOME
end

Now my fish_user_paths (and PATH) have JAVA_HOME:
echo $fish_user_paths
# /usr/local/sbin /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

echo $PATH
# /usr/local/sbin /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home /usr/local/bin /usr/bin /bin /usr/sbin /sbin

This means manpath also has $JAVA_HOME/man (abbreviated):
manpath
# /usr/local/share/man:/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/man:/usr/share/man

And it means man reads from the correct directory:
man --path java
# /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/man/man1/java.1

And I can switch to Java 8 and back to Java 11:
java8
man --path java
# /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/man/man1/java.1

java11
man --path java
# /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/man/man1/java.1


There is a separate problem, which is that JDK 11 seems to ship with JDK 8's documentation.
man -M /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/man javac | tail -n 1
# JDK 8                            03 March 2015                        javac(1)