After installation we should set following environment variables to let application servers and development environment start properly. Paths depend on Java version and installation directories:
Easiest way is to set the variables system-wide. In WinXP it is done by: Control Panel / System / Details / System variables. In Linux it is done by adding variables to user init script, e.g. .bashrc.
Note that CLASSPATH is one-line string variable. I just divided it to multiple lines for better readability.