Joe Harry wrote: . . .
pi@Menne ~ $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/opt/softwares/jdk1.7.0_45/bin
When you use which, it finds a “java” in /usr/bin, so that is /usr/bin/java. The which app reports whichever it finds first, and then stops looking. The default java installation is usually in /usr/bin.
Yes, I did add it to the beginning of the path and that did the trick!
Success!