config: fix 'JAVA_HOME is not defined correctly'

Signed-off-by: Fudong Bai <fudongbai@gmail.com>