📄 logintest.java~16~
字号:
package loginejb;
import javax.naming.Context;
import javax.rmi.PortableRemoteObject;
import java.util.Properties;
import javax.naming.InitialContext;
public class logintest {
public static void main(String[] args) {
/* try{
InitialContext ctx= null;
String url="t3://localhost:7001";
String user="kingbill";
String password="10041207";
Properties properties=null;
//Context context=null;
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL,url);
properties.put(Context.SECURITY_PRINCIPAL,user);
properties.put(Context.SECURITY_CREDENTIALS,password);
ctx = new InitialContext(properties);
//ctx = new InitialContext();
Object ref=ctx.lookup("UserRemote");
UserRemoteHome userremotehome=(UserRemoteHome)PortableRemoteObject.narrow(ref,UserRemoteHome.class);
UserRemote userremote = userremotehome.findByPrimaryKey("kingbill");
System.out.println("username="+userremote.getUsername());
System.out.println("password="+userremote.getPassword());
}
catch(Exception e){e.printStackTrace();}
*/
String a="D:\\bea\\jdk142_04\\bin\\javaw -classpath";
System.out.println();
System.out.println("username=kingbill");
System.out.println("password=11111111");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -