Linux,UNIX,Solaris,FreeBSD environment variable settings
The environment variable PATH should be set to point to the location where the Java binaries are installed. If you have trouble setting up – please refer to the shell documentation.
For example ,Assuming you are using bash as your shell, you can add the following to the end of your .bashrc file: export PATH=/path/to/java:$PATH