I have recently attempted to install java on ubuntu server 12.04 LTS.
I wgetted the tar.gz file and extracted it to /opt/java and then added /opt/java/bin to the path variable. This all works correctly when typing "java" into the command line, however in scripts it acts as if the command does not exist. Thank you in advance for any answers :)