I have a shell script on the Mac which looks for javaw
. i.e.:
#!/bin/sh
javaw -version 2> /dev/null
if [ $? == 0 ]; then
javaw -jar some.jar
else
echo "Java Runtime not installed or JRE executable not in PATH"
fi
but it gives this error when I run it:
Java Runtime not installed or JRE executable not in PATH
Clearly it can't find javaw
. So, my question is - where is javaw
on Mac OS X [Version 10.10.2 (14C109)]?
==== UPDATE
Java is installed. e.g:
$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)