I am new to Ubuntu and am trying to set up Java to run and compile programs. As I am very fresh, I am not sure how to tell which version I am using but file /sbin/init returns:
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x7aa29ded613e503fb09fb75d94026f3256f01e7a, stripped
The problem I have is when it comes to running the Java programs. Although the programs compile they don't seem to run. I used this guide: http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux
And everything seems fine until I go to run the program I get this error message:
bash: /usr/bin/java: No such file or directory
Java is supposed to be run from /usr/local/java and the /etc/profile has:
JAVA_HOME=/usr/local/java/jdk1.7.0_45 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin JRE_HOME=/usr/local/java/jre1.7.0_45 PATH=$PATH:$HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH
I'm sure I'm missing something really simple. Thanks in advance.