Means it didn't find the command. That means either it doesn't exist, it isn't accessible or it doesn't know where to look.
The most likely culprit being it doesn't know where to look.
You can fix that simply either:
1) Adding the directory where the java command is to your PATH variable.
2) Creating a symbolic link from where the java command is to a directory that is already in your PATH variable.
3) Typing the full path to where the binary is.
To see your PATH variable type "echo $PATH". You should see something like:
Each of the items separated by the colons is a directory that will be searched when you type a command without a full path.
So if you the above PATH but the new install put your java binary in say /usr/lib/java1.7/bin/java you could either append the directory to your PATH:
Create the link:
ln -s /usr/lib/java1.7/bin/java /usr/local/bin/java
Also the above export would add it to your running PATH but would not add it for new sessions. To do that you'd have to modify the PATH= statement in the specific user's home directory file (e.g. .bashrc or .bash_profile) or if you want it for all users to the global profile such as /etc/profile or /etc/bashrc. (Note that after adding to a file a user has to either log out and login again or source the modified file for the change to take effect.)