Fix java path issue on some platforms.