To execute java binary (bin) for all users, please run these commands below;
sudo ln -s -v /opt/jdk1.7/bin/java /usr/bin/java
sudo ln -s -v /opt/jdk/bin/javac /usr/bin/javac
<target_name> <sembolic-file_name>
<target_name> ; java installation directory
<sembolic-file_name> ; binary directory of all users
sudo ln -s -v /opt/jdk1.7/bin/java /usr/bin/java
sudo ln -s -v /opt/jdk/bin/javac /usr/bin/javac
<target_name> <sembolic-file_name>
<target_name> ; java installation directory
<sembolic-file_name> ; binary directory of all users