Where possible both PATH and CLASSPATH should be set in your .profile
Set your PATH to include the location of your JAVA executable.
export PATH=$PATH:$ORACLE_HOME/jdk/bin
JAVA needs to know where to find relevant classes (e.g. the JDBC class).
This can be set on the command line (using the -cp argument of java).
Alternatively, and preferably, the CLASSPATH should be set in your environment.
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib/ojdbc6.jar:.:$APXDIR/apex/utilities
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/jdbc/lib/ojdbc5.jar:.::$APXDIR/apex/utilities