/opt is not in the path, so java binary is not found. Add it to the path, symlink it to /usr/local/bin or install in /usr/local.
Keep in mind that /opt is backuped by default so it is not the best place. Better to use /usr/local and create a .tcz extension.
Also you may need to create a JAVA_HOME environment variable.