简体   繁体   English

Java RMI添加数字

[英]Java RMI adding numbers

I am trying to learn how RMI works in Java (complete beginner at RMI) and I have been looking at some examples which show how to add two numbers together. 我正在尝试学习RMI如何在Java中工作(在RMI中完全初学者),我一直在研究一些示例,这些示例展示了如何将两个数字组合在一起。 The problem is that I always use netbeans (and want to continue doing so) and all the examples are Java from command line. 问题是我总是使用netbeans(并希望继续这样做),所有示例都是来自命令行的Java。 Does anybody know how to do such a small application from netbeans? 有谁知道如何从netbeans做这么小的应用程序? (i'm using build 6) Thanks very much in advance :) The tutorial i've been looking at is: http://www.scs.ryerson.ca/mes/courses/cps530/programs/rmi/Schildt/addTwoNumbers.html (我正在使用build 6)非常感谢提前:)我一直在关注的教程是: http//www.scs.ryerson.ca/mes/courses/cps530/programs/rmi/Schildt/addTwoNumbers html的

You'll need to run two pieces: one for the server and another for the client. 您需要运行两个部分:一个用于服务器,另一个用于客户端。 You'll start the RMI server and let it listen for requests, then run the client and interact with the server. 您将启动RMI服务器并让它侦听请求,然后运行客户端并与服务器交互。

NetBeans will have to be able to run two applications inside it. NetBeans必须能够在其中运行两个应用程序。 I'm sure it's possible if you look at it properly. 我相信如果你正确看待它是可能的。 You'll just have to be sure to package the code in such a way that there's server, client, and common classes. 您必须确保以包含服务器,客户端和公共类的方式打包代码。

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

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