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.
Runtime.getRuntime().exec("start rmiregistry");放入RMI 服务器以自动启动 rmiregistry是个好主意吗?还是你们有其他建议?
Runtime.getRuntime().exec("start rmiregistry");
您可能想尝试这样的事情:
try { java.rmi.registry.LocateRegistry.createRegistry(1099); System.out.println("RMI registry ready."); } catch (Exception e) { System.out.println("Exception starting RMI registry:"); e.printStackTrace(); }
取自这里。此处提供文档。