I had this problem as well, first off you need to use the CNInitialContextFactory instead of the WsnInitialContextFactory(Bug!). Also visit this site
http://www7b.boulder.ibm.com/wsdd/library/techtip/0111_cox.html and create .bat or .sh to set up your environmental variables( instructions on how to do this are at the site ). You might need to include some more librarys than the ones listed as part of there .bat file. Just run JMSAdmin and see what its missing and add them to the .bat.
Now I'm on to the next step of creating a sender but I'm getting a javax.jms.InvalidDestination: MQ2008: cannot open Queue. So if anyone has ideas on this it would be appreciated.