java RMI 中的 rmic 是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2080025/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is rmic in RMI?
提问by giri
I like to know what is rmic in RMI and how does it create proxies for me..
我想知道 RMI 中的 rmic 是什么以及它如何为我创建代理..
回答by Pascal Thivent
To answer your question, rmic[Solaris, Windows] is the Java RMI compiler and it generates stubs, skeletons, ties for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.Regarding the how, your question is a bit vague but the answer might be something like it complies to the JRMP protocol or IIOP protocol or CORBA IDL specification.
为了回答您的问题,rmic[ Solaris, Windows] 是 Java RMI 编译器,它使用 JRMP 或 IIOP 协议为远程对象生成存根、骨架和关系。还生成 OMG IDL。关于如何,您的问题有点含糊,但答案可能类似于它符合 JRMP 协议或 IIOP 协议或 CORBA IDL 规范。
Have look at the provided link(s) for a description of these various concepts. If this sounds like Chinese to you, you should probably look at the RMI tutorial. The first chapter of the tutorial covers RMI concepts.
查看提供的链接以获取对这些不同概念的描述。如果这对您来说听起来像中文,您可能应该查看RMI 教程。本教程的第一章介绍了 RMI 概念。
Also note that (from the tutorial):
另请注意(来自教程):
With versions prior to Java Platform, Standard Edition 5.0, an additional step was required to build stub classes, by using the rmic compiler. However, this step is no longer necessary.
对于 Java Platform, Standard Edition 5.0 之前的版本,需要一个额外的步骤来构建存根类,通过使用 rmic 编译器。然而,这一步不再是必要的。
So if your RMI server doesn't have to support clients running on pre-5.0 VMs, you actually don't need to worry about rmic.
因此,如果您的 RMI 服务器不必支持在 5.0 之前的 VM 上运行的客户端,您实际上无需担心rmic.
Another good resource to get started is... Getting Started Using Java RMI, a Hello World sample for RMI.
另一个入门的好资源是...开始使用 Java RMI,RMI的 Hello World 示例。
If you want to get more information, check out the Remote Method Invocation spec.
如果您想获得更多信息,请查看远程方法调用规范。

