📄 helloworldclient.java
字号:
package ch05.section02;
import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import java.util.Properties;
public class HelloWorldClient {
public static void main(String[] args) {
try {
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
HelloWorldHome home = (HelloWorldHome) ctx.lookup("HelloWorldHome");
HelloWorldRemote helloworld = home.create();
System.out.println(helloworld.helloWorld());
helloworld.remove();
}
catch (Exception e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -