📄 environment.java
字号:
package bible.rmi.example2;import javax.naming.*;import java.util.*;/** * Environment class provides static methods and members relating to your * Weblogic Server configuration. */public class Environment { /** Field JNDI_FACTORY */ public final static String JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory"; /** Field WEBLOGIC_URL */ public final static String WEBLOGIC_URL = "t3://localhost:7001"; /** * Returns an InitialContext based on the JNDI_FACTORY and WEBLOGIC_URL * configuration. * @throws NamingException */ public static InitialContext getInitialContext() throws NamingException { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY); env.put(Context.PROVIDER_URL, WEBLOGIC_URL); return new InitialContext(env); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -