Java消息传递服务示例 [英] java messaging service example
本文介绍了Java消息传递服务示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是JMS的新手.但是我对JMS有很好的了解.我的问题是,即使是一个简单的jms示例,我也无法运行.
我在执行以下代码时得到"javax.naming.NoInitialContextException:需要在环境或系统属性中指定类名称"
I''m new to JMS. but i have good knowledge of JMS. my problem is, I''m not able to run even a simple jms example.
I''m getting "javax.naming.NoInitialContextException: Need to specify class name in environment or system property" when i execute the following code
Context con = new InitialContext();
Car car = new Car();
con.bind("car",car);
Object lookup = con.lookup("car");
帮助我解决这个问题.我整天都在尝试tis.
在此先感谢
help me out to sesolve tis problem. i have been trying tis for the whole day.
Thanks in Advance
推荐答案
[ ^ ],可能的原因是您的配置中缺少定义.
This hints[^] that a likely cause is a missing definition on your config.
这篇关于Java消息传递服务示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文