do you have both 1.3.1 and 1.4 in the system? because java needs you uninstall the older verson ....
2 version of java shouldn't be appear on the same system.
if you got 1.4 running, you shouldn't need to install 1.3.1 (is it because u try to learn j2ee, jsp and servelt? and the book recommand you use 1.3?)
1.4 has all the function that is needed, if you want to do jsp, servlets , etc. just go ahead and get tomcat. delete 1.3 if u got 1.4