Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 java RMI 服务器,它使用 UnicastRemoteObject.export 导出自身。有没有办法找出嵌入在服务器存根中的 IP 地址?
您的存根的默认值toString将返回一些信息,如下所示:
toString
Test1[UnicastServerRef [liveRef: [endpoint:[172.30.235.40:53209](local),objID:[-79d153e9:13ff67a80cc:-7fff, -4560008469324700920]]]]