在 Netbeans 中使用 RMIC

发布于 2024-07-25 10:51:39 字数 81 浏览 3 评论 0 原文

我在netbeans 6.5中编写了rmi服务器代码。 如何在 netbeans 6.5 中使用 rmic 以便创建 server_stub 类?

I have written rmi server code in netbeans 6.5. How can I use rmic in netbeans 6.5 so that I can create server_stub class?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

吖咩 2024-08-01 10:51:39

如果您使用 Spring 的远程代理 (RmiProxyfactoryBean),则根本不需要生成任何存根/骨架类。 Spring 在幕后为您施展所有魔法。 您甚至不需要实现Remote 接口!

请参阅此处的文档

If you use Spring's remote proxying (RmiProxyfactoryBean), you don't need to generate any stub/skel classes at all. Spring just does all the magic for you behind the scenes. You don't even need to implement the Remote interface!

See the docs here

你与清晨阳光 2024-08-01 10:51:39

为什么不编辑位于项目根目录中的标准 build.xml? 包含 Rmic Ant 任务。 每次您在 netbeans 中构建项目时,这都会自动 rmic 您的类。

Why not edit the standard build.xml located in the project root directory? Include the Rmic Ant task. This will automatically rmic your classes every time you build a project in netbeans.

蘸点软妹酱 2024-08-01 10:51:39

您不能通过 netbeans 使用 rmic。 您需要通过在命令行运行 rmic 命令来手动生成服务器存根。 但如果是 Eclipse,您可以借助 rmi 插件从 ide 生成存根。

you cannot use rmic through netbeans. you need to generate the server stub manually by running the rmic command at the command line. but in case of eclipse you can generate the stub from the ide with the help of rmi plugin.

无戏配角 2024-08-01 10:51:39

您必须将以下代码插入到您的 build.xml 文件中。

<目标名称=“startRMI”取决于=“init”> 
       
       
   
  

然后右键-> 构建.xml-> 运行目标-> 其他目标-> startRMI

这将启动 RMI 注册表。

You have to insert the below code into your build.xml file.

<target name="startRMI" depends="init">
    <exec executable="rmiregistry" dir="${build.classes.dir}">
    </exec>
</target>

Then right click -> build.xml -> Run target -> Other targets -> startRMI

This will start the RMI registry.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文