Hi everyone,
I'm sure there are a still quite a few people out there who are interested in how to start RMI in NetBeans. Although the demand for RMI support has been decreasing lately, this doesn't mean that it has completely disappeared. And with just a little tweaking, you can start the RMI registry in NetBeans very easily. Assuming you've already created RMIClient and RMIServer classes, do the following:
- 1. In your open project, go to the Files window.
- 2. Open the build.xml file in the Source Editor.
- 3. Paste the following Ant Script into the build.xml file:
<target name="startRMI" depends="init">
<exec executable="rmiregistry" dir="${build.classes.dir}">
</exec>
</target>
- 4. To start the registry, right-click the build.xml file, then select Run Target > Other Targets > StartRMI.
- 5. The Output window should display the result.
- 6. Run your RMIServer file. In the Output window, it should be displayed as "bound in server."
- 7. Run your RMIClient file, and watch it go.
See you tommorrow. Cheers!
--James