简体   繁体   English

从另一个Java程序运行RMI程序

[英]Run RMI program from another java program

I need to start RMI server object java code from another java executable. 我需要从另一个Java可执行文件启动RMI服务器对象Java代码。 When I try to run the main java program which calls the RMI java program using exec() function, I get ClassDefNotFound error. 当我尝试运行使用exec()函数调用RMI Java程序的主Java程序时,出现ClassDefNotFound错误。 I am using eclipse. 我正在使用日食。 However, if i run the RMI program directly from console it works. 但是,如果我直接从控制台运行RMI程序,它将起作用。

Can someone please help me to solve the issue. 有人可以帮我解决问题。

Thank you 谢谢

I need to start RMI server object java code from another java executable. 我需要从另一个Java可执行文件启动RMI服务器对象Java代码。

Why? 为什么? Why write two programs when one will do? 为什么要编写两个程序? Just export the remote object(s) from the 'other' Java program. 只需从“其他” Java程序中导出远程对象即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM