using rmic in netbeans

余生颓废 提交于 2019-12-14 01:40:24

问题


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?


回答1:


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




回答2:


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.




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/1067499/using-rmic-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!