这样做:是有url的,看到了吗?
prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL, "t3://localhost:7001");
ctx = new InitialContext(prop);
return ctx.lookup(JNDIName);
prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL, "t3://localhost:7001");
ctx = new InitialContext(prop);
return ctx.lookup(JNDIName);
谢谢!