当我尝试使用rmic RemoteMethodImpl
以下方法生成存根文件时:出现以下错误:
error: File .\RemoteMethodImpl.class does not contain type RemoteMethodImpl as expected, but type InterfaceImplementation.RemoteMethodImpl. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
error: Class RemoteMethodImpl not found.
2 errors
Run Code Online (Sandbox Code Playgroud)
这是什么错误?为什么我得到这个?
应@Shashank Kadne 的要求
package InterfaceImplementation;
import Interfaces.RemoteMethodIntf;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.RemoteException;
import Design.Main_Design_Client;
/**
*
* @author program-o-steve
*/
public class RemoteMethodImpl extends UnicastRemoteObject implements RemoteMethodIntf{
public RemoteMethodImpl() throws Exception{}
@Override
public void send(String IP,String Message) throws RemoteException {
Main_Design_Client mdc = new Main_Design_Client();
mdc.jTextArea1.setText("<html><b>Message from :</b></html>" + IP);
mdc.jTextArea1.setText("<html><b>Message :</b></html>" + Message);
}
Run Code Online (Sandbox Code Playgroud)
}
我假设您位于“InterfaceImplementation”文件夹之外的目录中。
执行 : rmic InterfaceImplementation.RemoteMethodImpl
| 归档时间: |
|
| 查看次数: |
2723 次 |
| 最近记录: |