We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f0bd80 commit 399efdeCopy full SHA for 399efde
1 file changed
src/cn/aofeng/demo/java/rmi/RmiServer.java
@@ -1,6 +1,5 @@
1
package cn.aofeng.demo.java.rmi;
2
3
-import java.net.MalformedURLException;
4
import java.rmi.AlreadyBoundException;
5
import java.rmi.RemoteException;
6
import java.rmi.registry.LocateRegistry;
@@ -31,8 +30,9 @@ public static Registry createRegistry(int port) {
31
30
32
/**
33
* @param args [0]:绑定端口
+ * @throws RemoteException
34
*/
35
- public static void main(String[] args) throws RemoteException, MalformedURLException, AlreadyBoundException {
+ public static void main(String[] args) throws RemoteException {
36
int port = Integer.parseInt(args[0]);
37
UserService userService = new UserServiceImpl();
38
Registry registry = createRegistry(port);
0 commit comments