check your ClassPath in the environment variables
Probably your system CLASSPATH, but I would put the JDK in a path without spaces too. I'm just superstitious about that. I am somewhat new to Tomcat and JBoss, so I cannot help any further yet.
You must download java sdk1.4 kit from www.sun.com and install it. What you have in C:\Program Files\Java\j2re1.4.1_02 is java runtime environment for running simple applets and not the full java sdk. You must download java sdk1.4.
After installing java sdk1.4 go to control panel, click system, click advanced, click environment variables, click on system variable, enter new field, on variable name type JAVA_HOME, on value type C:\jdk1.4 this depends where you install the jdk.
Finally set the classpath by entering new setting,
type CLASSPATH on name and type C:\jdk1.4\lib\tools.jar on value "depends where you install the jdk". I Hope This Helps.