Fixed java search logic in startup script.