I'm guessing that CLASSPATH isn't set before you source the script, and so you are only setting a local variable.

Here's an illustration of what might be happening:

superman@metro:~$ Z=foo # Only sets for this shell
superman@metro:~$ echo $Z
foo
superman@metro:~$ /bin/bash
superman@metro:~$ echo $Z # Not set in sub-processes
superman@metro:~$ exit
exit
superman@metro:~$ export Z # When exported, is part of environment
superman@metro:~$ /bin/bash
superman@metro:~$ echo $Z # And now visible to sub-processes
foo
superman@metro:~$ exit
exit
superman@metro:~$ help export
export: export [-nf] [name[=value] ...] or export -p
NAMEs are marked for automatic export to the environment of
subsequently executed commands. If the -f option is given,
the NAMEs refer to functions. If no NAMEs are given, or if '-p'
is given, a list of all names that are exported in this shell is
printed. An argument of '-n' says to remove the export property
from subsequent NAMEs. An argument of '--' disables further option
processing.