Maven: detect Java using java_home

Closes #19618.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>