You could also try running "java -version" from the terminal command line and check that it can identify itself.
My laptop says
[D:/TECS]
% java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode)
[D:/TECS]
%
Assuming that works, in your script with the trace flag set, comment out the java -classpath and put in the java -version command and see if it runs from the script and identifies itself.
# java -classpath "${CLASSPATH}:
java -version
--Mark