在聊天应用程序和列表中使用RMI [英] use of RMI in chat application and list
问题描述
i希望在java中实现聊天应用程序..有一个服务器和多个客户端可以连接到服务器,服务器接受客户端并在向量中存储客户端名称,所以我想显示所有客户端形式的向量。我在应用程序中使用RMI,服务器实现Runnable接口,所以当我尝试实现扩展Remote和Runnable ineterface的另一个接口时,它给出了服务器无法实现扩展Remote的类的错误...所以我该怎么办?
请给我回答,请给它一个明智的.....
thnk u ....
i want to implement chat application in java..there is one server and multiple clients can connected to server,server accepts clients and store clients name in the vector, so i want to display that vector to the all clients form.I used RMI in application,and server impliments Runnable interface so when I try to implement another interface which extend Remote and Runnable ineterface it give error that server can not implement the class which extend Remote... so how can i do?
please give me answer,pls pls its argent.....
thnk u.... .
推荐答案
服务器和客户端需要两个程序。服务器定义接口,客户端调用它。简单。
我只是希望有一个教程 [ ^ ]向您展示步骤做什么......
Two programs are needed the server and the client. The server defines the interface and the client calls it. Simples.
I just wish there was a tutorial[^] that shows you step-by-step what to do...
这篇关于在聊天应用程序和列表中使用RMI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!