I think the OP has some environment variables (CLASSPATH) set in his shell and then attempts to execute something (a java app) that requires that. The only problem being that the shell (from -s) probably adjusts the environment somewhat.
On my system, the following works fine:
Code:
CLASSPATH="xxx" sudo -s
echo $CLASSPATH
I still get xxx as output.
The following might work, though:
Code:
CLASSPATH="xxx" sudo bash -c 'echo $CLASSPATH'