尝试生成存根文件时出错 [英] error while trying to generate stub file

查看:44
本文介绍了尝试生成存根文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用:rmic RemoteMethodImpl 生成存根文件时我收到以下错误:

When i try to generate a stub file using :rmic RemoteMethodImpl I get the following error :

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

这是什么错误?为什么我会得到这个?

What error is this ? Why do i get this ?

应@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);
}

}

推荐答案

我假设您位于InterfaceImplementation"文件夹之外的目录中.

I am assuming you are in a directory just outside "InterfaceImplementation" folder.

执行:rmic InterfaceImplementation.RemoteMethodImpl

这篇关于尝试生成存根文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆