If you look at the sample nsd.tcl file that's mentioned in the OpenACS Documentation, you'll see the following:
#
# nsjava - aolserver module that embeds a java virtual machine. Needed to
# support webmail. See http://nsjava.sourceforge.net for further
# details.
#
ns_section "ns/server/acs-pg/module/nsjava"
ns_param EnableJava "off" ;# Set to on to enable nsjava.
ns_param VerboseJvm "off" ;# Same as command line -debug.
ns_param LogLevel "Notice"
ns_param DestroyJvm "off" ;# Destroy jvm on shutdown.
ns_param DisableJITCompiler "off"
ns_param ClassPath "/usr/local/jdk/jdk118_v1/lib/classes.zip:/usr/local/aolserver/bin/nsjava.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java/activation.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java/mail.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java"
Although I have never configured webmail in either ACS Classic or OpenACS, my guess is that you might be better off downloading the nsjava module first and reading any accompanying documentation to figure out how to compile it properly.