Hi,
The point is you probably downloaded the latest version of the J2EE 1.4, but the JMS book or resource that you have belonged to elder ones.
So do these steps.
1- try to find jms jar file to import into your IDE to help you develop your program better
( Although I can run my programs without any compilation or run time error but it's still a problem in some )
2- try to configure the environment parameters as it says in the book.
3- try to download the latest J2EE 1.4 from this link
http://java.sun.com/j2ee/1.4/download.html
4- use this tutorial and samples.
(*) It's important to check whether the package that you are downloading has the deploytool included, otherwise you need to find that too to deploy your packages into the jar files.
if you go these steps, you can easily compile and run the samples.
if you have more question , don't hesitate to ask me.
Take care
APT