我编写了以下代码来设置我的Context:
Properties properties = new Properties();
properties.put(Context.PROVIDER_URL, "tcp://localhost:3035");
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.exolab.jms.jndi.InitialContextFactory");
Context context = new InitialContext(properties);然而,当我执行jar时,我得到了这个异常(NB :不是当我做编译+对不起我不能在这里写它时):http://pastebin.com/5i9SbvEh
我不知道为什么,因为我实际上有jndi、jms和openjms jars (我是用One-JAR做的)。
发布于 2017-03-05 15:24:18
我只是忘了那些依赖..。:
openjms
并发1.3.4并发-1.3.4.jar jms 1.1 jms-1.1.jar jndi 1.2.1 jndi-1.2.1.jar香料-jndikit 1.2香料-jndikit-1.2.jar
(http://openjms.sourceforge.net/usersguide/jars.html,部分“运行时罐子”)
https://stackoverflow.com/questions/42607371
复制相似问题