Help with a simple script and JAVA

for wakou:
ls -l $(which java) || sudo apt-get install sun-java5-jre || echo “An error has occurred when install java” && exit

Installs for you java once if there is no java on your machine. It will not do it again if there is a java installed(assuming the apt-get works, but as you said I think is zypper)
well if install sun-java5-jre no longer works than how new users could download it with this script? this should be updated with the latest repository(which I think might be found in the OpenSuse repository??). Why would the program not work with a previous version of java? Most likely it would work if not this whole think is useless as a script but at least we learned something.
By copying the jre directory you just duplicate something which already exists, in my opinion a very bad practice.
For hcw : I just copy and pasted the command you suggested:
script_path=$(dirname “${0}”)
Merry Christmas! and Happy New Year! to everyone.
Happy Holidays to the ones which celebrate any other holidays!